Setup of my swarm:
3 servers from which two have label sort=db and one label sort=app. When starting the database container with constraint:sort==db the container ends up as expected on the a server with label db. The name of this container is thedb.
When starting a dependent container with --link thedb:thedb and -e constraint:sort==app the startup will fail because it can’t find the linked container. However if I remove the -e constraint:sort==app the container does startup but is located next to the thedb container on a server with label db.
We are using a file based setup of the swarm, so no swarm agent is running on the different servers.
Is it correct that the given constraint is also used to lookup the container specified in the --link?
Are linked containers always deployed on the server running the container it depends on.
Any pointer is welcome.
I forgot to mention, I use docker version 1.6, this is due to the use of centos 6. This weekend we try to move over to centos 7 and docker 1.7. Hopefully linking between containers over multiple hosts will work then.
Answer: I seems I have to wait for version 1.8.0. So for now going to setup an environment with the 1.8.0dev version to try it out