DEV Community

jzombie
jzombie

Posted on

2 1

Using Docker for a local HTTPS proxy

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:

$ git clone https://github.com/zenOSmosis/docker-dev-ssl-proxy
Enter fullscreen mode Exit fullscreen mode
  • enter the repo directory
$ cd docker-dev-ssl-proxy
Enter fullscreen mode Exit fullscreen mode
$ docker run --net=host -e PROXY_ADDRESS="http://localhost:8080" docker-dev-ssl-proxy
Enter fullscreen mode Exit fullscreen mode

(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

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay