Overlay network not working not working between two containers - Part II

Ok – what you described or what your proposed solution is does work.

I need to have a service running on the worker node in advance prior to running the docker-compose file.

Idk a lot how things work, and may this is by design of the docker people, but this “trick” seems like a bad workaround hack.

Things work on the command line – meaning deploying a container on the worker node without the overlay network being listed under the docker networks. Once the service is deployed (from the worker node) manually the overlay network becomes visible.

This behavior falls down though when you stick docker-compose as an intermediate. Docker compose looks for the external network, doesn’t find it, and gives up. With the command line deploy you specify the overlay network and things work, with the docker-compose deploy scheme – you specify the overlay network and things don’t work since the network isn’t found.

Thanks for the reply. I spent hours scratching around and looking for a solution and didn’t really find one until I just played with things using a very simple and dumbed down test situation.