Found some great docker-images to use in local projects.
It’s well documentet in github here: https://github.com/sebastienheyd/docker-self-signed-proxy-companion
Here is an example of docker-compose from the github repo:
version: '2'
services:
proxy:
container_name: proxy
restart: always
image: nginxproxy/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./vhost.d:/etc/nginx/vhost.d
- ./certs:/etc/nginx/certs:ro
networks:
- proxy
proxy-companion:
container_name: proxy-companion
restart: always
image: sebastienheyd/self-signed-proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certs:/etc/nginx/certs:rw
networks:
proxy:
external: true
This guide can help you to add the certificate in Chrome: https://www.pico.net/kb/how-do-you-get-chrome-to-accept-a-self-signed-certificate/