From ab612f290f3a802a617b66a308c179fb1b0fc1f9 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Thu, 3 Nov 2016 14:17:25 +0100 Subject: [PATCH] [FIX] Odoo 8.0-10.0: entrypoints: pass the pg parameters with CMD When nothing is passed as argument to the docker container, the entrypoint will receive the content of the CMD of the dockerfile. In this case we have to pass the database configuration arguments, else Odoo won't run correctly. This is the case when you run the command of our documentation: ``` docker run -p 8069:8069 --name odoo --link db:db -t odoo ``` However, it should still be possible to run custom command (like `ls /`). --- 10.0/entrypoint.sh | 2 +- 8.0/entrypoint.sh | 2 +- 9.0/entrypoint.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/10.0/entrypoint.sh b/10.0/entrypoint.sh index 3878702..9fe792f 100755 --- a/10.0/entrypoint.sh +++ b/10.0/entrypoint.sh @@ -11,7 +11,7 @@ set -e DB_ARGS=("--db_user" $USER "--db_password" $PASSWORD "--db_host" $HOST "--db_port" $PORT) case "$1" in - --) + -- | odoo) shift exec odoo "${DB_ARGS[@]}" "$@" ;; diff --git a/8.0/entrypoint.sh b/8.0/entrypoint.sh index 9765824..50e82bc 100755 --- a/8.0/entrypoint.sh +++ b/8.0/entrypoint.sh @@ -11,7 +11,7 @@ set -e DB_ARGS=("--db_user" $USER "--db_password" $PASSWORD "--db_host" $HOST "--db_port" $PORT) case "$1" in - --) + -- | openerp-server) shift exec openerp-server "${DB_ARGS[@]}" "$@" ;; diff --git a/9.0/entrypoint.sh b/9.0/entrypoint.sh index 9765824..50e82bc 100755 --- a/9.0/entrypoint.sh +++ b/9.0/entrypoint.sh @@ -11,7 +11,7 @@ set -e DB_ARGS=("--db_user" $USER "--db_password" $PASSWORD "--db_host" $HOST "--db_port" $PORT) case "$1" in - --) + -- | openerp-server) shift exec openerp-server "${DB_ARGS[@]}" "$@" ;;