Setup from the box. https://github.com/seliverstov-maxim/docker-nginx-certbot
It gets certificates, and start nginx automatically. Also there is certbot witch update certificates automatically too.