Docker Community Forums

Share and learn in the Docker community.

Talk to database from swarm

I’m have a swarm with 3 containers and then I created a mysql instance using the docker run command. I can talk to my database from my machine on IP but I cannot talk to the database from inside any of my swarm containers.
I have tried,,

From inside a swarm container I can ping but I cannot ping

Can anybody please advise?


Did you link them?
Inspect the services to see networks information.