docker
docker copied to clipboard
Missing configure HTTPS
Docker image is missing HTTPS. Would be good use HTTPS by default
I'm not so sure HTTPS should be handled at this level. You need to issue valid certificate to make it usable and I believe it's better to manage this centrally than in every Docker container which can do http.
There are dozens of https frontends doing this, for example https://hub.docker.com/r/steveltn/https-portal/
I think we could do some think like this:
phpmyadmin:
image: phpmyadmin/phpmyadmin
volumes:
- ./keys:/keys_directory
environment:
- PMA_HTTPS=1
First of all, use an environment variable to choose if HTTPS will be used or not.
If the /keys_directory/server.{key,crt} doesn't exists, generate the keys as example:
openssl req -x509 \
-nodes \
-days 365 \
-newkey rsa:2048 \
-keyout /etc/nginx/ssl/server.key \
-out /etc/nginx/ssl/server.crt