Reputation: 1496
I am trying to work out how to use a private repository on docker hub in a swarm. I can not find any instructions anywhere.
I have a linux user called "codefreshrunner", the CI server does an ssh login to a server on the swarm and runs a command like:
docker service create --with-registry-auth --name my_docker_hub_0_1_2 --network main_net metcarob/my_docker_hub_image:0.1.2
When the docker registry is not private this works without a problem. When I set the registry to be private I get the following:
"No such image: metcarob/saas_…"
I have tried manually logging in to the server as codefreshrunner and preforming the docker login command. I have checked the ~/.docker/config.json file is created and is running.
Can anyone point me at any documentation on how to do this? All the documentation I have found is how to use a private registry with a swarm, but I don't want to use a private registry, just a private repository in the public docker hub.
Upvotes: 0
Views: 309