From f000eeed23eff1e61bd255deb21b7000cac404aa 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 | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/8.0/Dockerfile b/8.0/Dockerfile index db9e4c5..ab2d249 100644 --- a/8.0/Dockerfile +++ b/8.0/Dockerfile @@ -42,4 +42,4 @@ COPY ./openerp-server.conf /etc/odoo/ # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons VOLUME ["/var/lib/odoo", "/mnt/extra-addons"] -CMD ["/run.sh"] +ENTRYPOINT ["/run.sh"] diff --git a/8.0/run.sh b/8.0/run.sh index efa7b62..388f826 100755 --- a/8.0/run.sh +++ b/8.0/run.sh @@ -6,5 +6,7 @@ export PGPORT=$DB_PORT_5432_TCP_PORT export PGUSER=$DB_ENV_POSTGRES_USER export PGPASSWORD=$DB_ENV_POSTGRES_PASSWORD -# start Odoo -exec gosu odoo /usr/bin/openerp-server --config=/etc/odoo/openerp-server.conf +[ "$1" != "--" ] && exec "$@" + +shift +exec gosu odoo /usr/bin/openerp-server --config=/etc/odoo/openerp-server.conf "$@"