Reputation: 11
I'm learning about Docker Swarm and I can't pass the follow situation, even searching a lot:
I have a Docker Compose file, where I start 2 containers, one for an API and other for the database, both using the "backend" network.
In the same file, I have another container where I run a client for the API, but this client I have to put in other network, called "client". In this container, I can't ping the containers inside the "backend" network because the overlay network doesn't configure it like the bridge network.
Is there a way to configure that ?
Upvotes: 0
Views: 352
Reputation: 21
As far as I know, the communication should not take place between networks. This is not an error nor a misconfiguration. You just have to put the API in the same network as the client is, so the client can consume the API but having no access to the backend network. Make sure the API container is still in the backend network.
Upvotes: 1