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.

  • Kafka Docker - Difference between links and KAFKA_ADVERTISED_HOST_NAME
  • Docker Remote API does not list containers
  • Docker: how to force graylog web interface over https?
  • docker nginx:latest image - content on docker host not changing
  • Running cron python jobs within docker
  • Docker Update Secrets via API
  • 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?

  • (Docker) Getting error: docker-php-source: no such file or directory when building docker file
  • Assetss from wwwroot cannot be found on Docker Image
  • Docker save/load loose original image repository/name/tag
  • Can I update the hostname of a Docker Node?
  • ArangoDB Services from Web Interface not accessible
  • how to run an image of software on other node?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.