mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
Alex Palaistras
4d26ccb8eb
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.
13 lines
236 B
Docker
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"]
|