Resolving hostname inside a container docker deploy with swarm

270 Views Asked by At

I deploy some service with swarm. When I ping the service label inside the corresponding container, it gives an IP not present in ifconfig.

In my /etc/hosts I have only automatic names generates by docker. In swarm, I can't use 'name' option in docker-compose.

I try to configure mysql group replication and it verify that the node name matches an ip of the node container.

I find a lot of post about this but I didn't find a clearly a way to do.

Could you help me ?

0

There are 0 best solutions below