I have a Linux (ubuntu 18.04) VM that has Docker on it and inside the containers of Docker my applications are running using Nginx. I want to install a SSL certificate on these applications so the websites will have https. I searched for a way to apply the certificate on them even when they're inside Docker containers but I couldn't find a way to do that I found only ways that work on a VM and not on a container.
I tried to ssh to a container and to apply the certificate as if it was a VM using this guide but it resulted in networking errors.
EDIT: I realized let's encrypt work for public websites and decided to use OpenSSL to be able to do it privately. The Ubuntu VM is in a private network in an Azure Cloud environment and so the websites are private.