Small, powerful, scalable web/proxy server
If you like / use this project, please let me known by adding a ★ on the GitHub repository.
docker run --interactive --publish 80:80 --rm --tty timonier/nginxNote: By default nginx opens port 80.
It is possible to change UID and / or GID of user nginx (user used to run nginx) with environment variables NGINX_UID and NGINX_GID:
docker run --env NGINX_GID=1005 --env NGINX_UID=1005 --interactive --publish 80:80 --rm --tty timonier/nginxIt is possible to run a container in read-only mode if you mount the following folders:
/etcif you want to changeUIDorGIDof usernginx./etc/nginx,/run,/tmpand/var/cache/nginx.
Note: /run, /tmp and /var/cache/nginx can be mount as tmpfs. In that case, /run must have flag exec.
# If you do not want to change "UID" or "GID" of user "nginx"
docker run --interactive --publish 80:80 --read-only --rm --tmpfs /run:exec --tmpfs /tmp --tmpfs /var/cache/nginx --tty timonier/nginx
# If you want to change "UID" or "GID" of user "nginx"
docker run --env NGINX_GID=1005 --env NGINX_UID=1005 --interactive --publish 80:80 --read-only --rm --tmpfs /run:exec --tmpfs /tmp --tmpfs /var/cache/nginx --tty --volume /etc timonier/nginx