Sign inSign up

onaci/nginx-flex

By onaci

•Updated 4 months ago

Image
0

9.4K

onaci/nginx-flex repository overview

⁠onaci/nginx-flex

A variant of nginxinc/docker-nginx-unprivileged⁠ (which is itself a variant of _/nginx⁠) that allows the UID and GID of the unprivileged nginx user account to be configured via environment variables at runtime.

⁠Environment Variables

  • ACCESS_LOG: whether access logging should be enabled. Set this to 1 to enable access logging, or 0 to disable access logging (e.g. if your nginx container is behind a reverse proxy server that is already logging everything). The default is 1 (enabled).

  • GID: The gid of the group-identity that the nginx server uses at runtime. Default is 101.

  • UID: The uid used by the nginx server at runtime. Default is 101.

⁠Usage

Note: The listen-port for this container is 8080 (inherited from the nginxinc/docker-nginx-unprivileged⁠) rather than 80 (or 443) as in the _/nginx⁠ image.

docker run -d \
  --name some-nginx \
  --env ACCESS_LOG=0 \
  --env GID=555 \
  --env UID=500 \
  -p 8080:8080 \
  -v /some/content:/usr/share/nginx/html:ro \
  onaci/nginx-flex

Check out the docs⁠ for the upstream Docker NGINX image for a detailed explanation of how to configure what the nginx server actually serves up.

Tag summary

Content type

Image

Digest

sha256:cc3982753…

Size

28 MB

Last updated

4 months ago

docker pull onaci/nginx-flex