2018-12-12 16:15:27 +01:00
2018-12-12 16:15:27 +01:00
2018-01-15 09:51:40 +01:00
2018-12-10 13:38:10 +01:00
2018-01-15 09:51:40 +01:00
2018-12-11 08:18:08 +01:00

docker-nginx

Dockerfile to create and run your own nginx process inside an alpine docker container.

docker volumes

/nginx/etc

Contains: vhost for nginx. Must end in *.conf (set in /etc/nginx/nginx.conf)

/nginx/www

Contains: webroot for vhost etc

/nginx/ssl

Contains: SSL certificates, ment as read only for web workes from a central ssl store

docker build

docker build -t YOURNAME/YOURCONTAINER:YOURTAG .

docker run

docker run --name nginx \
    -u 1000:1000 \
   -v volume-etc:/nginx/etc \
   -v volume-www:/nginx/www \
   -v volume-ssl:/nginx/ssl:ro \
   -d 11notes/nginx:latest

difference between official container

Additional plugins:

    module_headers_more

Nginx configuration and uid/gid:

    uid:gid both set to static 1000:1000
    all data moved to /nginx

build with

tips

  • Don't bind to ports < 1024 (requires root)
  • alpine-docker-netshare - Examples to store persistent storage on NFS/CIFS/etc
Description
Nginx, slim and distroless to be used behind a reverse proxy or as full version as a proxy
Readme MIT 186 KiB
Languages
Dockerfile 100%