-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildkit + gcr.io private repos (credHelpers) do not stack #720
Comments
@haizaar Yes, I think this is a bug with Will try to fix this for 18.09.1 |
Yes, when I unset DOCKET_BUILDKIT, it all works fine.
…On Tue., 13 Nov. 2018, 06:45 Tõnis Tiigi ***@***.*** wrote:
@haizaar <https://github.com/haizaar> Yes, I think this is a bug with
credHelpers in cli. Would it be possible for you to confirm that without
credhelpers, private pulls from grc work fine?
Will try to fix this for 18.09.1
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#720 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADjWZCOZlKwcTLYePMVxO_5PSHlhdKFks5uucDsgaJpZM4YZRRB>
.
|
@haizaar I didn't mean that. Does it work with buildkit when you do regular |
@tonistiigi
After several minutes I hit a CTRL-C and got the same forbidden error as in my original post. So, can we conclude that buildkit does not work with private registries at all? |
I had the same issue. Adding |
Adding
The error is for the private repo image I try to start FROM. |
Looked into it and it actually seems to be a gcr bug. I thought this was because of credential helpers but this part seems to work fine. Containerd and buildkit use a concept of shallow pulls where only parts of an image are pulled. For example, in buildkit this is how the metadata of base image can be used by the builder before the image has actually been pulled (eg. to determine cache matches without pulls). The way authentication works is that the client expects 401 Unauthorized to be returned from the registry and then authorizes the request based on the response headers. In gcr, from looking at the data, it seems that only the unauthenticated manifest requests return 401 while the unauthenticated blob requests return 403 what is not a response that can be used for asking the credentials. As the result of that the private pulls from gcr only work on specific conditions where manifest and config are pulled by the same action as the layers. Why it worked with external implementation was actually a side-effect of another bug that failed to pull the config on a proper time and is being fixed in #729 . |
Thanks for the explanation. So... should we start bugging Google about this? |
@tonistiigi I see same issue with Nexus (OSS 3.14.0-04) and latest Docker for Mac. |
@mslusarczyk Do you have the same behavior as this issue (hanging on blob download while manifests pulled fine) or #721 (failure when using |
It looks like GCR fixed the Based on the specification, the blobs endpoint should be supporting 401 as well https://github.com/opencontainers/distribution-spec/blob/master/spec.md#fetch-blob |
I pinged the team that's actively work on the registry about this, but responses may be delayed due to the holiday week. (for some historical context)
It was nice to support mirroring with literally zero code changes to the serving path. This change would basically necessitate GCR special-casing the mirroring codepath to avoid exactly the check you want added. If you don't hear from someone by next week, feel free to ping me again. |
Temp. workaround solution for moby moby/moby#38246 |
@tonistiigi Sorry for the delay
Build with
All works fine without DOCKER_BUILDKIT=1 |
Ping @mattmoor Can please someone update about the status of this issue? Is it indeed GCR only and we expect them to fix their service? Is there a temporary workaround that is going to land into 18.09.1 release? |
Looks like the work-around is going to be merged into docker-ce 18.09.1: docker-archive/engine#122 |
My previous conclusion that it works was premature. With BUILDKIT=1 docker 18.09.1 can't pull privates image from gcr.io regardless of Seems like it fails to fetch blob:
Without BUILDKIT=1 all works fine. |
Did another test with private registry on dockerhub - all works great. So this is indeed a gcr.io issue. Will try to persuade Google support.
|
Hi,
Can we use a different EDIT: probably same issue as #721, but it should already been fixed in 18.09.1, right? Thanks! |
@carlosgalvezp Do you experience with gcr.io or other private registry provider? |
Yes, do you have |
Do you have an idea what the workaround will be released? In the meanwhile, Google support say "We will continue to investigate to determine if this is a GCR-level issue." I'll update the thread is there are any news. |
@haizaar I'm having the issue with a private docker registry, not gcr.io. Should I move the discussion to #721 even if it was closed? @tonistiigi Yes I do have 18.09.1 and still I encounter this error. Thanks! |
Actually now that I check it seems that I have 18.09.1 in the client but 18.09.0 in the server...
|
Got an update from Google that GCR team acknowledged the issue and they are going to address it, but there is no ETA currently. |
Here is the ticket in Google issue tracker to watch: https://issuetracker.google.com/issues/123043691 |
Facing the same issue while using |
Workaround PR moby/moby#38246 got merged into |
We are facing this issue as well. After trying a bunch of different authentication mechanisms, we decided to just |
@michael-gillett Can you try Docker v19.03 with moby/moby#38246 ? I'm closing this issue because it seems fixed now, but feel free to ping us if you are still hitting. I also tested the latest standalone buildkitd as well and it works fine. |
@AkihiroSuda Docker v19.03 is still not released though. |
$ docker run -p 127.0.0.1:2375:2375 -d --privileged docker:19.03.0-beta3-dind
$ export DOCKER_HOST=tcp://127.0.0.1:2375 |
So did gcr fix their side or was that a different case? |
I'm not sure 😅 Somebody else can confirm? |
@AkihiroSuda did not work for me on |
I tried dind as @AkihiroSuda suggested and it actually worked for me - it was able to pull an imaged listed in FROM from private GCR repo. All good! |
The Google issue I listed earlier is still open. |
@haizaar The Google issue you listed earlier seems to be fixed now: https://issuetracker.google.com/issues/123043691#comment6 Does this mean this could be resolved? |
Docker 18.09-ce here.
I have FROM directive in my dockerfile pointing to a private registry:
Running
DOCKER_BUILDKIT=1 docker build .
with this Dockerfile never finishes (after 5 minutes I hit CTRL-C).Without buildkit it builds fine in seconds.
My ~/.docker/config.json is as follows:
After waiting long time and pressing CTRL-C, the following error is printed (exact image names scrambled with
...
):Bug?
The text was updated successfully, but these errors were encountered: