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
If a credHelper is defined, 'docker build' with a private FROM image fails, while docker pull of the same image works correctly.
Steps to reproduce the issue:
'docker login' to your private repository (we are using artifactory)
Add a credHelper to config.json - for this I went with '{"credHelpers": {"blah.com": "false"}}'
Make a dockerfile with a FROM for a non-existant tag in a private image of your private repo
docker build - you will get the error "the client does not have permission for the manifest"
docker pull - you will get the error "The named manifest is not known to the registry"
Remove the credHelper - now docker build will get "The named manifest is not known to the registry"
Describe the results you expected:
'docker build' to be able to pull images the same as 'docker pull'
Additional information you deem important (e.g. issue happens only occasionally):
From our nginx logs, we can see that when the daemon requests a token it makes a request like '/v2/token?account=username' when running 'docker pull', but '/v2/token?scope=repository...' when running 'docker build'. I do not have access to the daemon logs, but the token request on 'docker build' appears to be completely unauthenticated. Removing the credHelper (whether it works or doesn't seems to be immaterial) changes the behavior- in that case, the daemon submits a correctly authenticated request for a token.
Our environment is quite locked down. The base OS is a frozen rhel8 image with an immutable root filesystem- can't upgrade the daemon. I also cannot copy and paste more than a couple lines of text, which is why I tried to include the important parts, but will take the time to get the rest later.
If any credential helper returns an error, the whole function returns 'nil', instead of continuing to the next one or returning the ones it already has. I would contend that this is a bug- the CLI in this case should either ignore the bad one(s) and still provide the good ones, or print an error message about which host isn't working. Ideally- both, ignore the bad ones and tell the user which ones it ignored.
Actually looks like a straightforward fix, but I am not allowed to make open source contributions without a three month legal review :)
If a credHelper is defined, 'docker build' with a private FROM image fails, while
docker pull
of the same image works correctly.Steps to reproduce the issue:
docker build
- you will get the error "the client does not have permission for the manifest"docker pull
- you will get the error "The named manifest is not known to the registry"docker build
will get "The named manifest is not known to the registry"Describe the results you expected:
'docker build' to be able to pull images the same as 'docker pull'
Additional information you deem important (e.g. issue happens only occasionally):
From our nginx logs, we can see that when the daemon requests a token it makes a request like '/v2/token?account=username' when running 'docker pull', but '/v2/token?scope=repository...' when running 'docker build'. I do not have access to the daemon logs, but the token request on 'docker build' appears to be completely unauthenticated. Removing the credHelper (whether it works or doesn't seems to be immaterial) changes the behavior- in that case, the daemon submits a correctly authenticated request for a token.
Output of
docker version
:Client-
Version: 20.10.2
API: 1.39
OS: linux/amd64
Server:
Version: 20.10.2
API: 1.41
The text was updated successfully, but these errors were encountered: