-
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
Load metadata even when the image is locally available #5340
Comments
The only request that needs to happen if you have already accessed the image once is a If you are using buildkit in dockerd or with a containerd worker you can override it by pulling image with the same name to the image store (and not setting |
I guess related; Would implementing that be an option for this? |
@thaJeztah The version described there that is missing is |
Perhaps from a pure technical perspective, but I'd consider "contacting the registry" to be a "pull" from a user perspective; --pull=never to be a "don't contact registry; use offline" mode |
That's not what your definition is in the proposal. There is means "error if there is no local image". "don't contact registry; use offline" is the default (but you need to have offline version of the image). |
But BuildKit pulls the image and checks the registry if it's up to date?? I understand the build-cache with BuildKit may not store it in the list of images. But (really!) from the user's perspective it's pulling an image. If we don't consider that an image, then we must update all our docs, because they're wrong; https://docs.docker.com/reference/dockerfile/#from |
No, it does not if you have an image with that name already.
🤷♂️ BuildKit 100% deals with images and takes image names as input. Images are in the registry or in image stores. |
I meant do not contact the registry in any way, because the reason I want to use the local image only is because the registry might not be reachable. Even only loading the metadata makes it pointless. Is it possible? |
@ttc0419 It is possible with docker or containerd that can keep local snapshots of the images for you. See #5340 (comment) It is also possible if you use immutable image references with digest checksums. |
I know it can store the image snaphosts and not to "pull" it, I meant is it possible not to send the |
Storing the image snapshot is how you avoid sending the |
But my problem was it still sends the |
If you have a local registry that you are pointing to the What I was saying is that if you do |
Wait, did you mean it only works with images that pulled from a registry? My base images were built from another Dockerfile, is that the reason why it's loading metadata every time because it cannot find any on docker hub? |
No, the images from |
I'm using nerdctl with buildkit, will that be a problem? |
Hi, even if images in the Dockerfile are available in local storage, buildit still load metadata from docker.io/library, which takes a lot of time:
Is there a way to disable it?
The text was updated successfully, but these errors were encountered: