From 22de85b69ee75468a94b0cef668faae14ae5516d Mon Sep 17 00:00:00 2001 From: Samus CTO Date: Fri, 27 Feb 2015 14:41:23 +0100 Subject: [PATCH] [IMP] use ENTRYPOINT instead of cmd and permit giving command arguments --- 8.0/Dockerfile | 2 +- 8.0/run.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/8.0/Dockerfile b/8.0/Dockerfile index 87dc838..ce116e2 100644 --- a/8.0/Dockerfile +++ b/8.0/Dockerfile @@ -45,4 +45,4 @@ COPY ./openerp-server.conf /etc/odoo/ # Mount /var/lib/odoo to allow restoring filestore VOLUME ["/var/lib/odoo"] -CMD ["/run.sh"] +ENTRYPOINT ["/run.sh"] diff --git a/8.0/run.sh b/8.0/run.sh index f1dd6a0..5884e02 100755 --- a/8.0/run.sh +++ b/8.0/run.sh @@ -1,5 +1,7 @@ #!/bin/bash +[ "$1" != "--" ] && exec "$@" || shift + CONFIG_FILE=/etc/odoo/openerp-server.conf # sets a configuration variable in openerp-server.conf @@ -21,4 +23,4 @@ set_config "db_user" $DB_ENV_POSTGRES_USER set_config "db_password" $DB_ENV_POSTGRES_PASSWORD # start Odoo -exec gosu odoo /usr/bin/openerp-server --config $CONFIG_FILE +exec gosu odoo /usr/bin/openerp-server --config $CONFIG_FILE "$@"