https://medium.com/@vshab/nginx-with-lets-encrypt-in-docker-container-e549d18c00d7 https://github.com/vshab/nginx-with-lets-encrypt-in-docker-example
https://certbot.eff.org/lets-encrypt/debianbuster-other
https://hub.docker.com/r/certbot/certbot/
https://github.com/andyneff/docker-letsencrypt
#!/usr/bin/env bash
docker build -t flask-server .
echo "Starting certbot..."
time docker run -p 80:80 -u 0 --entrypoint "/usr/bin/certbot" flask-license-server certonly --standalone -d example.com --email [email protected] -n --agree-tos --expand
sudo docker commit $(docker ps -lq) flask-server
echo "Done with certbot and commiting changes to the docker file."
sleep 2
echo "Starting the server docker image..."
docker run --env-file .env -p 443:443 -p 80:80 -u 0 --entrypoint "python" -dit flask-server server.py
echo "Launching cron"
docker exec -it $(docker ps -lq) cron