coreos-home-server/service/nginx/Containerfile
Alex Palaistras 4d26ccb8eb nginx: Add default user to shared GID=10000
Users and groups used within Podman containers are usually assigned UID
and GID 10000. Files for these containers are sometimes served by Nginx,
and may be given permissions that restrict access to those outside the
group, but which are intended to be served nonetheless.

This commit adds the pre-defined `nginx` user to a `nginx-shared` group
with GID 10000, which will then allow access to these files as needed.
2022-05-04 11:29:53 +01:00

13 lines
236 B
Docker

FROM docker.io/nginx:1.21
RUN addgroup --system --gid 10000 nginx-shared
RUN gpasswd --add nginx nginx-shared
COPY container/config /etc/nginx
COPY container/run-nginx /run-nginx
RUN nginx -t
EXPOSE 80 443
ENTRYPOINT ["/run-nginx"]