fix(docker): add cap_net_bind to the nginx binary in the docker container

This commit is contained in:
kolaente 2023-03-11 21:16:31 +01:00
parent 72a1aaa654
commit e7b89ae44f
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 0 deletions

View File

@ -66,5 +66,7 @@ RUN chmod 0755 /docker-entrypoint.d/*.sh /etc/nginx/templates && \
chmod -R 0644 /etc/nginx/nginx.conf && \
chown -R nginx:nginx ./ /etc/nginx/conf.d /etc/nginx/templates && \
rm -f /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
# Allow the unprivileged user to run nginx on port 80
RUN apk add libcap && setcap cap_net_bind_service=+ep /usr/sbin/nginx
# unprivileged user
USER nginx