Nginx reverse proxy image with Certbot (LetsEncrypt) support
250
docker run -d --tty --name nginx -p 80:80 -p 443:443 -v /tmp/nginx:/etc/nginx/conf.d -v /etc/docker-gen/templates sighne/nginx
docker run -d --name nginx-gen --volumes-from nginx -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/docker-gen -notify-sighup nginx -watch -only-exposed /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
nginx:
build: ./Dockerfile/Nginx
image: sighne/nginx
container_name: nginx
ports:
- "80:80"
volumes:
- /tmp/nginx:/etc/nginx/conf.d
- /etc/docker-gen/templates
tty: true
nginx-gen:
image: jwilder/docker-gen
container_name: nginx-gen
volumes_from:
- nginx
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
command: "-notify-sighup nginx -watch -only-exposed /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf"
docker exec -it nginx certbot certonly --standalone
NB: Generate domain certificate before creating the corresponding container
Certbot: https://certbot.eff.org
Nginx-proxy: https://github.com/jwilder/nginx-proxy
Content type
Image
Digest
Size
124.1 MB
Last updated
over 9 years ago
docker pull sighne/nginx