We have a docker-swarm cluster. The manager node holds the credentials to our private docker registry. When we start new containers on other nodes the image might need be pulled from the private docker registry.
Is there a way to tell the crate container command to pull the image (if not already existent on the node) and to provide it with the credentials?
For example: We want to call the following command from the swarm manager (that has the credentials for the private docker registry):
docker create -e contraint:server==app docker.exampleRegistry.com/path/image:1.0.0
This should pull the image and start a container on another node (labeled app). The docker registry docker.exampleRegistry.com is private. But we get:
Error response from daemon: unauthorized: authentication required