Sometimes when you're developing locally, you might need to use HTTPS, and might not have that tooling available in your framework of choice.
So I created this small Docker container which essentially creates a self-signed SSL certificate and uses nginx as a reverse proxy to pipe your request to whatever address you want to.
To use:
- clone the repo (https://github.com/zenOSmosis/docker-dev-ssl-proxy)
$ git clone https://github.com/zenOSmosis/docker-dev-ssl-proxy
- enter the repo directory
$ cd docker-dev-ssl-proxy
- run the following (replacing "http://localhost:8080" with your desired proxy-to address)
$ docker run --net=host -e PROXY_ADDRESS="http://localhost:8080" docker-dev-ssl-proxy
- Then navigate to https://localhost in your browser
(The address you've defined in PROXY_ADDRESS will be proxied through to https://localhost.)
Note: For production usage, you might want to check out: https://github.com/linuxserver/docker-swag
Top comments (0)