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.

  • “golang.org/x/net/ipv4” working on Mac, but not on Linux
  • Node.js web application not running properly in Docker stack
  • How do I access Windows eventlog of a Docker container
  • Docker: effect of logging driver on logs
  • Docker CentOS 7 Fail push to private insecure registry v1.12.0
  • How to access/Install/Setup Web Panel on live application RethinkDB
  • 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 Compose - Not picking up the dump file in the init command?
  • Trying to create postgis inside docker file gives the error
  • Sharing data across containers
  • How to tune/troubleshoot/optimize docker block i/o on AWS
  • How do you map port on host inside swarm mode on Windows?
  • Reattaching orphaned docker volumes
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.