I have a docker swarm, and a container inside of an overlay network on that swarm. The container has an app written in golang that interacts with the Docker API by creating a container and starting it. When I run my golang app on the host machine, everything runs perfect and it creates and runs the container without issue. However when I put the app into the container and run it in my overlay network, it no longer can reach the API.
I'm assuming this has something to do with networking, but the idea of my project is that there are multiple services, each with their own networks, that can create, launch, and remove containers they see fit. NOT running the SDK in an app outside of the overlay networks unfortunately is not an option at this time.
Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?