You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an error whenever I create a service in swarm cluster with an image that hosted in a private repository on docker hub.
The service is working, it's just the error message that is printed every time I create a service.
Steps to reproduce the issue:
Create a private repository in docker hub
Create a swarm cluster
Login to docker
Pull the image on the server
Create a service with the image
Describe the results you received:
unable to pin image organization/some-image to digest: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
Describe the results you expected:
No error message
Output of docker version:
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Fri Mar 24 00:45:26 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: c6d412e
Built: Fri Mar 24 00:45:26 2017
OS/Arch: linux/amd64
Experimental: false
This is expected; when creating a service, docker does not automatically pass on your credentials. Passing credentials / authentication information is an explicit action (by design), as those credentials will be stored in the swarm, and are distributed to the nodes where the service is deployed on.
To pass credentials, use the --with-registry-auth option when creating the service, or to update the authentication information on an existing service (docker service update --with-registry-auth).
I don't think there's a bug here, but let me know if that worked, or if you're still running into issues
w.r.t. Pull the image on the server, then deploy; Swarm mode "pins" images to their digest, so guarantee that all instances of your service run exactly the same version of your image. For this, it will contact the registry, and resolve the "digest" (immutable tag). For this, it needs access to the registry. If resolving the digest fails, docker will fall back to using the image:tag you provided when creating the service, and use a local image (if it exists); see #31518
Description
I'm getting an error whenever I create a service in swarm cluster with an image that hosted in a private repository on docker hub.
The service is working, it's just the error message that is printed every time I create a service.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
No error message
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
azure, using docker-machine
The text was updated successfully, but these errors were encountered: