From a2df51d563444a8b6602bd2623ebab9d93082ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Posp=C3=AD=C5=A1ek?= Date: Thu, 20 Jun 2019 14:32:39 +0200 Subject: [PATCH] make Dockerfile work with current Ubuntu apache requires a APACHE_RUN_DIR env settings --- slides.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/slides.md b/slides.md index 5e842aa..73afc4d 100644 --- a/slides.md +++ b/slides.md @@ -478,17 +478,20 @@ drwxr-xr-x 22 root root 4096 Sep 22 13:24 .. ~/apache2-build$ echo 'Docker world' > html/index.html $ cat Dockerfile -FROM ubuntu:14.04 +FROM ubuntu:latest -RUN apt-get update -yqq +RUN apt-get update -yqq RUN apt-get install -yqq apache2 +RUN mkdir /var/run/apache2 +RUN chown www-data.www-data /var/run/apache2 -ENV APACHE_RUN_USER www-data +ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data -ENV APACHE_LOG_DIR /var/log/apache2 -ENV APACHE_LOG_DIR /var/log/apache2 -ENV APACHE_LOCK_DIR /var/run/lock -ENV APACHE_PID_FILE /var/log/apache2/apache.pid +ENV APACHE_LOG_DIR /var/log/apache2 +ENV APACHE_LOG_DIR /var/log/apache2 +ENV APACHE_LOCK_DIR /var/run/lock +ENV APACHE_RUN_DIR /var/run/apache2 +ENV APACHE_PID_FILE /var/log/apache2/apache.pid EXPOSE 80 ADD html/index.html /var/www/html/index.html ENTRYPOINT ["/usr/sbin/apache2"]