Attach container outside of the swarm to network of the swarm

Hi,

Is it possible to attach a container OUTSIDE of the Swarm network to the Swarm network?
So if I have MySQL cluster outside of the swarm, the services in the Swarm needs to access the MySQL cluster.

Hi
Yes, you can do it. You can create overlay network with attachable option. Following is an example.
docker network create --attachable --driver overlay oneta
docker service create --name web --network oneta --replicas 2 nginx
docker run –ti --name client --network oneta smakam/myubuntu:v4 bash

Regards
Sreenivas

1 Like

Thank you very much!