简体   繁体   中英

How can I use a docker container with a self signed certificate on osx?

I'm using Docker to test within an Apache/PHP environment ( https://github.com/tutumcloud/apache-php ).

The scripts that i'm using require that I be on a secure connection (https). This can even be a self signed certificate. Anything to get the browser to work over https. The problem is that docker only seems to work over http.

How can I get docker to run with a self signed cert over https?

Previously i've used a different NPM module ( https://www.npmjs.com/package/http-server ) to use http-server and used a self signed cert which works great to get on HTTPS, unfortunately it only serves static files and nothing server side like PHP.

Thank you.

Docker image that you use does not provide SSL by default. You can upgrade it and create your own image based on it with added SSL. But it is job for DevOps. So, you can easily use another docker image from docker hub which supports SSL out of the box.

Only try https://hub.docker.com/r/eboraas/apache-php/ - it supports SSH and PHP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM