I have just started testing docker swarm and have created a private repository on Docker hub, uploaded an image to it and am now trying to start a docker swarm service from that image. Each time I try, i get the message
unable to pin image… to digest: errors
denied: requested access to the resource is denied
unauthorized: authentication required
so
Each of the nodes is logged in to my account
I can pull the image manually onto each of the nodes using
docker pull myid/test:1.0.0.0
I can list the images on each node and get
myid/test 1.0.0.0
but when I run the command
docker service create --replicas 1 --name test3 myid/test:1.0.0.0 --with-registry-auth
it fails with the above message. It appears not to be able to use the local copy, or download it from docker hub.
I’m sure what I’m doing wrong is incredibly obvious, but I can see it at the moment. Any help would be greatly appreciated.
Expected to work if you do:
docker login
docker service …
Actual:
unable to pin image… to digest: errors
denied: requested access to the resource is denied
unauthorized: authentication required
I had the same problem in (below) and fixed after upgrading:
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 10:40:59 2017
OS/Arch: darwin/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 07:52:04 2017
OS/Arch: linux/amd64
Experimental: true
fixed:
Client:
Version: 17.06.0-ce-rc2
API version: 1.30
Go version: go1.8.1
Git commit: 402dd4a
Built: Wed Jun 7 10:02:52 2017
OS/Arch: darwin/amd64
Server:
Version: 17.06.0-ce-rc2
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: 402dd4a
Built: Wed Jun 7 10:02:04 2017
OS/Arch: linux/amd64
Experimental: true
Actual:
$ docker -l debug service create --name test -with-registry-auth --name testserv iname
image iname could not be accessed on a registry to record
its digest. Each node will access iname independently,
possibly leading to different nodes running different
versions of the image.
utvauv9f345ycv2x7wzx0q22y
Since --detach=false was not specified, tasks will be created in the background.
In a future release, --detach=false will become the default.