|
|
@ -45,13 +45,22 @@ ENV APACHE_RUN_DIR=/var/run/apache2 |
|
|
|
ENV APACHE_RUN_USER=deploy |
|
|
|
ENV APACHE_RUN_USER=deploy |
|
|
|
ENV APACHE_RUN_GROUP=deploy |
|
|
|
ENV APACHE_RUN_GROUP=deploy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# allow sudo http-foreground for deploy user |
|
|
|
|
|
|
|
ADD sudoer_deploy /etc/sudoer.d/deploy |
|
|
|
|
|
|
|
RUN chmod 0440 /etc/sudoer.d/deploy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# switch to user deploy |
|
|
|
USER deploy |
|
|
|
USER deploy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# set path to include ~/.local/bin |
|
|
|
ENV PATH "$PATH:/home/deploy/.local/bin" |
|
|
|
ENV PATH "$PATH:/home/deploy/.local/bin" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# install elab users management script |
|
|
|
RUN pip install --upgrade pip |
|
|
|
RUN pip install --upgrade pip |
|
|
|
RUN pip install git+https://git.cpi.imtek.uni-freiburg.de/CPI/elab-users.git |
|
|
|
RUN pip install git+https://git.cpi.imtek.uni-freiburg.de/CPI/elab-users.git |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# change the working directory |
|
|
|
WORKDIR /data |
|
|
|
WORKDIR /data |
|
|
|
|
|
|
|
|
|
|
|
USER root |
|
|
|
|
|
|
|
# Start httpd as root, but will switch to deploy user thanks to env variable |
|
|
|
# Start httpd as root, but will switch to deploy user thanks to env variable |
|
|
|
CMD ["httpd-foreground"] |
|
|
|
CMD ["sudo", "httpd-foreground"] |