This image runs a Python script to:
- Launch a Nginx container
- Run Certbot to obtain HTTPS certificates from Let's Encrypt
- Configure Nginx to use HTTPS
- Schedule periodic certificate renewal
docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock v2net/nginx-https
docker build --force-rm --tag v2net/nginx-https .
docker run \
--rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /root/https/config.json:/root/docker/config.json \
v2net/nginx-https
Modify the file nginx/conf.d/https.conf
under /root/https/
, and reload Nginx:
docker exec https-nginx nginx -s reload