From 2b5021a8becc248f38ba1cde79563022dbff0b83 Mon Sep 17 00:00:00 2001 From: Samus CTO Date: Mon, 2 Mar 2015 15:19:43 +0100 Subject: [PATCH] [IMP] remove unneeded gosu from the Dockerfile --- 8.0/Dockerfile | 14 +++++--------- 8.0/run.sh | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/8.0/Dockerfile b/8.0/Dockerfile index ab2d249..b31c321 100644 --- a/8.0/Dockerfile +++ b/8.0/Dockerfile @@ -18,14 +18,6 @@ RUN apt-get update \ && apt-get -y install -f \ && rm -rf /var/lib/apt/lists/* wkhtmltox.deb -# Grab gosu for easy step-down from root -RUN gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu - # Install Odoo ENV ODOO_VERSION 8.0 ENV ODOO_RELEASE 20141231 @@ -35,11 +27,15 @@ 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 -# Run script and Odoo configuration file +# Copy run script and Odoo configuration file COPY ./run.sh / COPY ./openerp-server.conf /etc/odoo/ +RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons VOLUME ["/var/lib/odoo", "/mnt/extra-addons"] +# Set default user when running the container +USER odoo + ENTRYPOINT ["/run.sh"] diff --git a/8.0/run.sh b/8.0/run.sh index 388f826..41dc889 100755 --- a/8.0/run.sh +++ b/8.0/run.sh @@ -9,4 +9,4 @@ export PGPASSWORD=$DB_ENV_POSTGRES_PASSWORD [ "$1" != "--" ] && exec "$@" shift -exec gosu odoo /usr/bin/openerp-server --config=/etc/odoo/openerp-server.conf "$@" +exec /usr/bin/openerp-server --config=/etc/odoo/openerp-server.conf "$@"