-
Notifications
You must be signed in to change notification settings - Fork 75
Specific user cases
Karim Shakirov edited this page Mar 25, 2020
·
2 revisions
Sometimes for revers proxy you need access services on localhost or you don't want to attach Caddy's container to multiple containers' networks. In this case you can run Caddy connected to host network and access this containers over localhost:somePort.
Usage:
- run this docker-compose file:
version: '3'
services:
caddy:
image: caddy/caddy
network_mode: host
volumes:
- ./caddy_data:/data
- ./file/Caddyfile:/etc/caddy/Caddyfile
- don't forget to allow 80 and 443 in firewall
It's might be not safe and throws away most of the network security that Docker provides