Using dockers remote api in docker swarm

I have a microservice called “Creator”.

What that service does is use the docker remote api to create a new container with the microservice (“Calculator”) if needed.

  • How do I get the container ID of a non-running container?
  • npm install fails when running through a docker container
  • Increasing mysql max_connections to 1024 in a docker container
  • Can't push to remote docker registry
  • Changing zookeeper cluster leadership when leader dies
  • How to connect nodeJS docker container to mongoDB
  • Now I’m trying to get this working in Docker Swarm, and my question is about how I should be able to find the IP /DNS for the docker remote api in my swarm, from my service Creator.

    An example would be that I’ve created a swarm cluster with 6 nodes (3 managers, 3 worker). I specify that I would like to have 1 instance of my Creator, and that instance get’s located on a worker node. On a worker node my service wouldn’t be able to query the swarm, to get the ip / dns to the remote api.

    I could use a service discovery like consul and register a swarm manager here, and then query consul from my Creator service, but then I need to make sure consul is updated if a manager goes down.

    I would hope there is a nice way of locating a manager built in to swarm. Do you know?

  • Issues with artifactory Docker
  • AWS ECS Error when running task: No Container Instances were found in your cluster
  • connect via ssh to jhipster docker container on CentOS 7
  • docker container exited immediately after python script execution
  • Passing reports through docker in codecov gives error
  • Is it possible to show the `WORKDIR` when building a docker image?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.