I've been using https://github.com/jwilder/nginx-proxy and https://github.com/JrCs/docker-letsencrypt-nginx-proxy-compa... to achieve this for a year or two now. I prefer it because the domain configuration is set on the backend site, rather than the proxy image itself, which means you don't have to worry about cleaning anything up when you remove an image.