/docker-https

nginx reverse proxy to allow for https on local docker containers

docker-https

nginx reverse proxy to support https for your docker containers

Installation:

  1. Setup mkcert
  • brew install mkcert

  • mkcert -install

  • mkcert localhost 127.0.0.1

  1. Replace the generated localhost+1-key.pem and localhost+1.pem in the certs directory

  2. Update proxy_pass in nginx/nginx.conf to whichever docker namespace your service is using (ensure you also update the port it exposes)

  3. Add the service to your docker-compose.yml

    https:
    image: nginx:mainline-alpine
    ports:
    - 5000:5000
    volumes:
    - "./nginx/nginx.conf:/etc/nginx/nginx.conf"
    - "./certs/:/usr/share/certs/"

  4. docker-compose up -d https