Docker Community Forums

Share and learn in the Docker community.

SSL in a docker container

(Branden Keating) #1

I am having issues applying a cert to the nextcloud docker container, I am sure this is not as hard as it seems to be. I have created 2 certs with the below commands and have the apache “default-ssl.conf” file updated accordingly but still, I cannot get the site to load under “https”. I applied this same method to a server build of nextcloud (not a docker container) and it worked perfectly fine.

What I have done (Within the Docker container):
openssl genrsa -aes128 -out server.key 2048
openssl rsa -in server.key -out server.key
openssl req -new -days 3650 -key server.key -out server.csr
nano /etc/apache2/sites-available/default-ssl.conf



a2ensite default-ssl
a2enmod ssl

For some reason this does not take from within the docker container.