Browse Source

trying to get rid of segfault, changing to ubuntu

main
Holger Frey 3 years ago
parent
commit
3e4291070d
  1. 40
      Dockerfile

40
Dockerfile

@ -1,5 +1,7 @@
FROM ubuntu:latest FROM ubuntu:latest
# update to the latest packages
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update && apt-get upgrade -y RUN apt-get update && apt-get upgrade -y
# add user that will be used to install and run the application # add user that will be used to install and run the application
@ -11,36 +13,27 @@ RUN useradd -u 1000 -g deploy deploy
# #
# install required packages # install required packages
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y apache2 apache2-utils libapache2-mod-svn subversion RUN apt-get install -y apache2 apache2-utils libapache2-mod-svn subversion
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y vim curl lsof
# add svn configuration # install required packages for debugging
ADD dav_svn.conf /etc/apache2/sites-enabled/dav_svn.conf # RUN apt-get install -y vim curl lsof
# create writable directory for dav lock file
RUN mkdir /var/lib/dav/
#RUN chown deploy:deploy /var/lib/dav/
# apache should run as user deploy
#RUN sed -i.bak -r 's/(User|Group) apache/\1 deploy/' /etc/apache2/apache2.conf
RUN sed -i.bak 's/#ServerName www.example.com:80/ServerName svn.cpi.imtek.uni-freiburg.de:80/' /etc/apache2/apache2.conf
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
#RUN sed -i.bak 's/#LoadModule deflate_module/LoadModule deflate_module/' /etc/apache2/apache2.conf
#RUN sed -i.bak 's/#LoadModule logio_module/LoadModule logio_module/' /etc/apache2/apache2.conf
# copy the script to run httpd in foreground # copy the script to run httpd in foreground
COPY httpd-foreground /usr/local/bin/ COPY httpd-foreground /usr/local/bin/
#RUN chown deploy:deploy /usr/local/bin/httpd-foreground
RUN chmod u+x /usr/local/bin/httpd-foreground RUN chmod u+x /usr/local/bin/httpd-foreground
# setup the right permissions for deploy user # add svn site configuration
#RUN chown -R deploy:deploy /var/www/ ADD dav_svn.conf /etc/apache2/sites-enabled/dav_svn.conf
#RUN chown -R deploy:deploy /usr/lib/apache2/
#RUN chown -R deploy:deploy /run/apache2/
#RUN chown -R deploy:deploy /var/log/apache2/
# 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/#ServerName www.example.com:80/ServerName svn.cpi.imtek.uni-freiburg.de:80/' /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_PID_FILE=/var/run/apache2/apache2.pid
ENV APACHE_LOCK_DIR=/var/lock/apache2 ENV APACHE_LOCK_DIR=/var/lock/apache2
ENV APACHE_LOG_DIR=/var/log/apache2 ENV APACHE_LOG_DIR=/var/log/apache2
@ -48,6 +41,5 @@ 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
# Start httpd as root, but will switch to deploy user thanks to env variable
USER deploy
CMD ["httpd-foreground"] CMD ["httpd-foreground"]
Loading…
Cancel
Save