Caddy in docker blocked accessing other docker containers

Because in the second version, you’re not pinning it into a subfolder.

You’re effectively solving the issue with option 2.A. from my post.