From 656578ec29739ca7478b05ddac17984bdeacacb1 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 31 Aug 2021 12:39:40 +0200 Subject: [PATCH] running apache as user deploy running sudo this change allows the user deploy to run apache in the foreground by using sudo. therfore, if we run a command in the docker container, the user deploy will be used instead of root \o/ --- Dockerfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index dbadb22..ba55fcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,14 +44,6 @@ RUN chmod 0440 /etc/sudoers.d/deploy # switch to user deploy USER deploy -# setup runtime variables for apache -ENV APACHE_PID_FILE=/var/run/apache2/apache2.pid -ENV APACHE_LOCK_DIR=/var/lock/apache2 -ENV APACHE_LOG_DIR=/var/log/apache2 -ENV APACHE_RUN_DIR=/var/run/apache2 -ENV APACHE_RUN_USER=deploy -ENV APACHE_RUN_GROUP=deploy - # set path to include ~/.local/bin ENV PATH "$PATH:/home/deploy/.local/bin"