From b49edc2fa01c79ed0fc80b2862ad1100bfa9bdd1 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Wed, 14 Jun 2017 23:34:55 -0700 Subject: [PATCH] Add user in the image and not container. (#51) --- web/Dockerfile | 7 ++++--- web/assets/run.sh | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/Dockerfile b/web/Dockerfile index be7a532..5659d37 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -8,9 +8,8 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends ruby-sass \ wget \ postgresql-client \ - && rm -rf /var/lib/apt/lists/* - -RUN python -m pip install -U mailmanclient==3.1.0 \ + && rm -rf /var/lib/apt/lists/* \ + && python -m pip install -U mailmanclient==3.1.0 \ postorius==1.1.0 \ hyperkitty==1.1.0 \ django-mailman3==1.1.0 \ @@ -23,6 +22,8 @@ RUN python -m pip install -U mailmanclient==3.1.0 \ ADD mailman-web /opt/mailman-web +RUN useradd -M -U -u 1000 mailman + ADD assets/run.sh /opt/run.sh WORKDIR /opt/mailman-web diff --git a/web/assets/run.sh b/web/assets/run.sh index d69a8da..f2e7bde 100755 --- a/web/assets/run.sh +++ b/web/assets/run.sh @@ -91,7 +91,6 @@ python manage.py migrate # Create a mailman user with the specific UID and GID and do not create home # directory for it. Also chown the logs directory to write the files. -useradd -M -U -u 1000 mailman chown mailman:mailman /opt/mailman-web-data -R