You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

53 lines
1.5 KiB

FROM ubuntu:latest
# update to the latest packages
ENV DEBIAN_FRONTEND="noninteractive"
#RUN apt-get update && apt-get upgrade -y
# add user that will be used to install and run the application
RUN groupadd -g 1000 deploy
RUN useradd -m -u 1000 -g deploy deploy
# install required packages for debugging
# RUN apt-get install -y vim curl lsof
#
# CUSTOM PART IS BELOW HERE
#
# install required packages
RUN apt-get install -y apache2 apache2-utils libapache2-mod-svn subversion python3
# copy the script to run httpd in foreground
COPY httpd-foreground /usr/local/bin/
RUN chmod u+x /usr/local/bin/httpd-foreground
# add svn site configuration
ADD dav_svn.conf /etc/apache2/sites-enabled/dav_svn.conf
# create writable directory for dav lock file
#RUN mkdir /var/lib/dav/
# adjust apache configuration files
#RUN sed -i.bak 's/LogLevel warn/LogLevel debug/' /etc/apache2/apache2.conf
RUN sed -i.bak 's/Listen 80/Listen 80\nListen 8000/' /etc/apache2/ports.conf
# 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
USER deploy
ENV PATH "$PATH:/home/deploy/.local/bin"
RUN pip install --upgrade pip
RUN pip install git+https://git.cpi.imtek.uni-freiburg.de/CPI/elab-users.git
WORKDIR /data
USER root
# Start httpd as root, but will switch to deploy user thanks to env variable
CMD ["httpd-foreground"]