Docker Community Forums

Share and learn in the Docker community.

LetsEncrypt and Docker TLS Connection

I have to create secure Github-Jenkins-Docker deployment chain and I have to redirect to my docker container to my domain. But I am so new to Jenkins, Docker and Let’s Encrypt.
My question is that;
Is there a way to activate ssl certificate without using apache or another virtual server on Ubuntu Server? If there is my conditions like that;

I have 2 different server:
Server A: Ubuntu 16.04 (xenial) server which has docker daemon with secured daemon socket (I secured the socket like
ServerB: The server which Jenkins runs on.

ServerB connects ServerA’s secured daemon socket.
ServerB builds my docker image. For recovery times I am pushing this image to docker hub. Then,
ServerB triggers a command to run a container on ServerA’s docker.

My question is :

How I can create ssl certificate for this docker container by let’s encrypt? I am not using extra server or docker container. This container will be directly connected to my server’s 80 and 443 ports. But, I don’t know how I can manage with this.

Do you have any advice to help me? Even article or other materials to help me?

Note: Also I download Certbot (from It was saying standalone mode could be good, if I don’t have webroot. I create certificate for my domain by it but I couldn’t use it.

Thank you for help.