-
Notifications
You must be signed in to change notification settings - Fork 114
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
Images pushed to private repository not fetched lazily #1389
Comments
And... after writing this out, I think this may be a dupe of #1107 |
Reading closer, I'm not getting any of the gzip errors that #1107 had (e.g., So I think this may still be a different issue. |
Okay, well... that was an easy experiment. I created a new public repo (still with AWS ECR) and pushed to that and lazy pulling worked without a hitch. So now the question is how to get the stargz-snapshotter to authenticate with a private repo. |
@dmosdallas If you run stargz-snapshotter with the different user than your docker command (e.g. running stargz-snapshotter as root and docker as an unprivileged user), stargz-snapshotter maybe refer to different |
@ktock, yep, that makes sense to me. Let me verify that fixes things up and I'll close out the issue. Thanks for the quick response! |
And that did the trick! To summarize, the startz-snapshotter is a systemd daemon which was started running as root. I authenticated with my private repo as a non-root user and somehow expected it to be able to share those credentials. Kinda obvious that that wouldn't work in hindsight. For anyone coming across this in the future, I edited the stargz-snapshotter unit file (
and then ran:
To pick up the changes |
Background
I've installed the stargz snapshotter for docker following the instructions provided here.
I'm able to run one of the listed pre-converted images, doing the following:
$ docker run -it ghcr.io/stargz-containers/tomcat:10.1.0-jdk17-openjdk-bullseye-esgz /bin/bash
Running
mount
while the container is alive shows:So, I believe the snapshotter is configured correctly and is lazily-loading this pre-built image
Issue
I'm attempting to build a new eStargz image with BuildKit, following the instructions here, I run:
This builds & pushes to my registry successfully, but when attempt to run a container using this image, it appears to fallback to performing a full pull of the image (the entire image is downloaded locally & no fuse mounts are configured).
When I check the stargz-snapshotter logs, I see a bunch of:
These 401s seem suspicious, but reading the overview doc, it claims the stargz snapshotter should search for credentials in
~/.docker/config.json
, which contains the credentials for this registry.I'm now unsure if this is an issue:Building the image orFetching the image from my private repoI've now verified that this does work when pushing/pulling to a public repo, which now confuses as it seems to contridict the auth section of the overview documentation.
Additional details
Docker version 24.0.6, build ed223bc
The text was updated successfully, but these errors were encountered: