From 45bfe40dcbb1a952027c84aecb1d630577447316 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Tue, 10 Mar 2015 17:46:12 -0700 Subject: [PATCH] Change to ENTRYPOINT + CMD The addition of `set -e` in the run.sh script exposed the fact that it was erroring out when `$# -eq 0`. --- 8.0/Dockerfile | 7 ++++--- 8.0/{run.sh => entrypoint.sh} | 5 +---- 2 files changed, 5 insertions(+), 7 deletions(-) rename 8.0/{run.sh => entrypoint.sh} (71%) diff --git a/8.0/Dockerfile b/8.0/Dockerfile index 700be83..ad3de2f 100644 --- a/8.0/Dockerfile +++ b/8.0/Dockerfile @@ -27,8 +27,8 @@ RUN curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odo && apt-get -y install -f --no-install-recommends \ && rm -rf /var/lib/apt/lists/* odoo.deb -# Copy run script and Odoo configuration file -COPY ./run.sh / +# Copy entrypoint script and Odoo configuration file +COPY ./entrypoint.sh / COPY ./openerp-server.conf /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf @@ -41,4 +41,5 @@ EXPOSE 8069 8071 # Set default user when running the container USER odoo -ENTRYPOINT ["/run.sh"] +ENTRYPOINT ["/entrypoint.sh"] +CMD ["/usr/bin/openerp-server", "--config=/etc/odoo/openerp-server.conf"] diff --git a/8.0/run.sh b/8.0/entrypoint.sh similarity index 71% rename from 8.0/run.sh rename to 8.0/entrypoint.sh index f0f637c..e56a423 100755 --- a/8.0/run.sh +++ b/8.0/entrypoint.sh @@ -9,7 +9,4 @@ set -e : ${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD} export PGHOST PGPORT PGUSER PGPASSWORD -[ "$1" != "--" ] && exec "$@" - -shift -exec /usr/bin/openerp-server --config=/etc/odoo/openerp-server.conf "$@" +exec "$@"