-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
minikube cache add looking for remote images not local? #8867
Comments
Possibly related to updates to the go-containerregistry library used for caching. We now always pull the latest image from the registry, in order to save the digest. Should probably go with the local "php:api", instead of "docker.io/library/php:api" ? |
Podman uses However the code was supposed to ask the docker daemon before retrieving: image.go:168] retrieving image: php:api It fails due to this fix not being merged properly: google/go-containerregistry@72edbad |
This is the upstream bug: google/go-containerregistry#734 We need a regression test. For caching a local image, that is... |
Bitten by same bug |
Short question about what can be cached from a local repository. E.g (mongo:4.2 already present via
Whereas for a locally built image it looks like this:
|
What happened later ? It is supposed to be able to fetch it now:
Note there is a slightly pause there, as it is doing the actual fetch. |
Sorry I guess my question and example were a bit misleading. The command above for caching the mongo image indeed does not fail. The issue with that is if the remote is requiring authorization the request will fail and therefore also the
Is this behaviour correct in these cases? My expectation was that the image is always pulled from the local docker registry when the requested version is available there and just query the remote server if it is not found locally. |
I think the cache command only checks the docker daemon on the host, it does not check the images on the machine. i.e. It will download the images from the registry to the local disk, but it should also check on the machine before loading it. in the "needsTransfer", it will compare the image lists and digests |
I was running |
It is here: minikube/pkg/minikube/machine/cache_images.go Line 139 in 322e138
Normally we don't call the docker daemon a "registry", but reserve that term for the docker registry (i.e. the server) But the current code works by checking the server digest, and then comparing that with the machine (ImageExists) minikube/pkg/minikube/cruntime/docker.go Line 137 in 322e138
|
Actually it seems the behaviour has changed, after the preload was added. Now it only checks tags, not ids/digests:
cache_images.go:74] Images are preloaded, skipping loading Shouldn't matter in this particular case (mongo:4.2), but only when using something like "latest" for the image tag It will still save it from the network to the local disk first, though. i.e. even though it is on the VM, it will save to ~/.minikube/cache |
the following is the ouput after the command
minikube cache add php:api
E0728 22:02:58.007461 352660 cache.go:63] save image to file "php:api" -> "/home/artem/.minikube/cache/images/php_api" failed: nil image for php:api: GET https://index.docker.io/v2/library/php/manifests/api: MANIFEST_UNKNOWN: manifest unknown; map[Tag:api]
💣 Failed to cache and load images: save to dir: caching images: caching image "/home/artem/.minikube/cache/images/php_api": nil image for php:api: GET https://index.docker.io/v2/library/php/manifests/api: MANIFEST_UNKNOWN: manifest unknown; map[Tag:api]
minikube cache add docker.io-image:tag
adds no problem any remote image, doesn't it contradict the description ofminikube cache --help
where it says "Add, delete, or push a local image into minikube"it used to work fine couple of weeks ago and I could push local images to minikube node, seems like not any more?
could someone help to clarify on this please?
Best regards,
Artem.
The text was updated successfully, but these errors were encountered: