I’m using the CircleCI for a long time for building Docker Images and deploying to Docker Hub.
Since Docker Cloud from 21 of May will work only in a Docker Swarm mode I hope that i can deploy to Docker Swarm from CircleCI.
I rewrite my configuration for a simple project.
The current main step in my configuration is next:
Is that run in the context of your Circle container? If so, readers would probably need to see your Circle 2.0 config, and in particular what base image you’re running on.
I wonder, would the configuration you have shown already be best rendered as code? You’ve put it in a quote block, and I don’t know if pre-formatting it would make it more readable (this is certainly the case for YAML, of course). If you have not seen it yet, the code button in the toolbar looks like this: </>.
Hmm, OK. Which command is producing the Docker error? It looks like you’re sharing the Docker volume into a container, so there may be permissions problems. Check that everywhere you are issuing a docker command, your user is a member of the docker user group (even in containers).
Do you get the expected results for $CONNECT_RESULT and $DOCKER_IP?
Since CircleCI uses a remote docker install, you can’t just set DOCKER_HOST locally since it will just override the value for the remote host. So I create a container on the remote instance to act as a proxy and set DOCKER_HOST inside of it and then run subsequent commands in there.
Note the use of --with-registry-auth to ensure that the credentials are used on all of the nodes in the swarm.