reverting user to nobody, to avoid having to change permissions of existing data directories
This commit is contained in:
parent
d393fc5c89
commit
abd5b56c1d
@ -49,7 +49,7 @@ RUN \
|
|||||||
&& mkfifo /etc/services.d/php-fpm7/supervise/control \
|
&& mkfifo /etc/services.d/php-fpm7/supervise/control \
|
||||||
&& mkfifo /etc/s6/services/s6-fdholderd/supervise/control \
|
&& mkfifo /etc/s6/services/s6-fdholderd/supervise/control \
|
||||||
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
|
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
|
||||||
&& chown -R nginx.www-data /var/www /srv/* /etc/services.d /etc/s6 /run \
|
&& chown -R nobody.www-data /var/lib/nginx /var/tmp/nginx /var/www /srv/* /etc/services.d /etc/s6 /run \
|
||||||
# Clean up
|
# Clean up
|
||||||
&& rm -rf "${GNUPGHOME}" /tmp/* \
|
&& rm -rf "${GNUPGHOME}" /tmp/* \
|
||||||
&& apk del gnupg curl libcap
|
&& apk del gnupg curl libcap
|
||||||
@ -57,7 +57,7 @@ RUN \
|
|||||||
COPY etc/ /etc/
|
COPY etc/ /etc/
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
USER nginx:www-data
|
USER nobody:www-data
|
||||||
|
|
||||||
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
||||||
VOLUME /srv/data /tmp /var/tmp/nginx /run /var/log
|
VOLUME /srv/data /tmp /var/tmp/nginx /run /var/log
|
||||||
|
Loading…
Reference in New Issue
Block a user