From 65b5afd798acd55799166c1406d18f73519dab54 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Wed, 2 Dec 2020 21:30:56 +0100 Subject: [PATCH] [BUGFIX] fix jirafeau docker image - exposed port - fix lighttpd user - setup www-data group --- Dockerfile | 10 +++++++--- docker/lighttpd.conf | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe59b7e..f0071d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ FROM php:7.3-fpm-alpine MAINTAINER "Jérôme Jutteau " -ARG USER_UID=2009 + +# lighttpd user +ARG USER_UID=100 +# www-data group +ARG GROUP_UID=82 # install base RUN apk update && \ @@ -15,7 +19,7 @@ COPY .git .git RUN apk add git && \ git reset --hard && rm -rf .git .gitignore .gitlab-ci.yml CONTRIBUTING.md Dockerfile README.md && \ apk del git && \ - chown -R $USER_UID /www && \ + chown -R $USER_UID.$GROUP_UID /www && \ chmod o=,ug=rwX -R /www && \ chmod +x docker/cleanup @@ -35,4 +39,4 @@ RUN rm -rf /var/cache/apk/* CMD /www/docker/cleanup & php-fpm -D && lighttpd -D -f /etc/lighttpd/lighttpd.conf -EXPOSE 80 +EXPOSE 80 \ No newline at end of file diff --git a/docker/lighttpd.conf b/docker/lighttpd.conf index bb3d548..e4be235 100644 --- a/docker/lighttpd.conf +++ b/docker/lighttpd.conf @@ -2,7 +2,7 @@ var.basedir = "/www" var.logdir = "/var/log/lighttpd" var.statedir = "/var/lib/lighttpd" -server.port = 8080 +server.port = 80 server.modules = ( "mod_access", "mod_usertrack", @@ -13,8 +13,8 @@ server.modules = ( include "mime-types.conf" include "mod_fastcgi_fpm.conf" -#server.username = "lighttpd" -#server.groupname = "lighttpd" +server.username = "lighttpd" +server.groupname = "www-data" server.pid-file = "/run/lighttpd.pid" server.errorlog = var.logdir + "/error.log" -- 2.34.1