Caddy V2 + Varnish + Wordpress using Docker with SSL

Have you considered using this plugin instead?

You could drop Varnish altogether and just use one instance of Caddy. Seems like a mess to have 3 servers running instead of just one.

That said, I think a confusion you’re having with Docker has to do with how to refer to one service from another.

Docker ships with an internal DNS server that is configured to resolve service names to the container IP addresses. So instead of 192.168.200.184:9000, you should use wordpress:9000 and instead of localhost:80 you should use caddy:80, and so on.

I think that’s why bridge mode wasn’t working for you. Because localhost means “this container”.