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
docker image ls does not show images loaded from a tar file #47674
Comments
Tried the workaround listed in this issue-44579, |
There were a lot of changes related to the containerd integration since v24. Could you please try reproducing with v26? |
Does it also happen with If it doesn't, is there anything different about your image? For example: ❱ tar xO index.json < golangci.tar | jq
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:ed4bd7bb174cdb029a39224da6cc73aa860c0f623d9dbf931aa35e1f63b0ee18",
"size": 1529,
"annotations": {
"io.containerd.image.name": "docker.io/golangci/golangci-lint:v1.50.1",
"org.opencontainers.image.ref.name": "v1.50.1"
},
"platform": {
"architecture": "arm64",
"os": "linux"
}
}
]
} |
@vvoland , BUT, the second piece about I totally zoned out and forgot to mention one most important step. which is. We had this older docker version installed as a .deb package (by copying locally). While trying to upgrade the docker (after saving the image), it was actually upgrading the kernel as well, which we did NOT want it to upgraded for this change. After following this link on how to upgrade/install docker, we actually had to remove docker.io and install other packages listed in this link here. I have tested the whole process again and it installed the latest version of docker This seems to have solved this issue of images not being seen in docker image ls. |
Good to hear! I'll close the issue then. |
It appears that the image saved from old version of docker does not have index.json file and so we can not find the digest ID for it. However any new tags we try to pull for that loaded image in new version of docker again does not show up in Any help will be appreciated! |
I managed to reproduce this on v26 with: $ docker load -i <alpine-non-containerd.tar>
$ docker pull alpine:latest
# docker images will not show alpine Note: This only happens if the pulled image DiffID is identical (all layers have the same uncompressed digest) layer, so it wouldn't happen for example if the Quick notes on why it happens:
|
I really appreciate your response and re opening this issue! As you know we had docker.io installed from a local deb package (version We are trying to avoid the docker pull on all the images after the update and switching the storage drivers. Thank you. |
Okay so this does not seems to be the save issue from older version of docker. Is there an interim work around we can try and test? we would really like to migrate to use containerd snapshotter for all our needs. Thank you. |
Starting from v24+, The issue happens when re-pulling an image that was loaded from a image tar saved from the graphdriver (non-containerd snapshotter enabled Docker). You can do what you do now, just remember that if you do
|
Thank you for your help and quick responses in this matter. However we were able to solve that issue by using the local registry. For anyone interested, Here is how we did it without having to save/load and without having to pull the images again. 1). Update to latest supported version of docker 2). Create a local registry with bind volume mount.
3). For each image tag and push to local registry.
4). Stop the local registry and delete all the images using docker rmi -f
5). Switch to containerd ( 6). Restart docker for change to take affect 7). Re-run local registry 8). Verify all repositories. 9). For each image pull from local registry and re-tag
10). Verify all images
12). Clean up.
|
Description
After changing the storage driver to containerd and loading images from tar file from other storage drivers, images are not showing in "docker image ls" but it does show up in "ctr -n moby images ls".
Reproduce
From old storage driver.
docker save image1 -o image1.tar
docker save image2 -o image2.tar
docker-compose down
change the storage driver in sduo vi /etc/docker/daemon.json
"features" : { "containerd-snapshotter": true },
sudo systemctl docker
docker load --input image1.tar
docker load --input image2.tar
docker-compose up
docker ps
docker image ls # does not show any images.
sudo ctr -n moby images ls # shows both images are present.
Expected behavior
Received.
docker image ls
no images shows up which is loaded via docker load from a tar file (which was created from different storage driver)
Exepcted:
docker image ls
should show all the loaded images.
docker version
Client: Version: 24.0.5 API version: 1.43 Go version: go1.20.3 Git commit: 24.0.5-0ubuntu1~20.04.1 Built: Mon Aug 21 19:50:14 2023 OS/Arch: linux/amd64 Context: default Server: Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.3 Git commit: 24.0.5-0ubuntu1~20.04.1 Built: Mon Aug 21 19:50:14 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.12-0ubuntu1~20.04.3 GitCommit: runc: Version: 1.1.7-0ubuntu1~20.04.2 GitCommit: docker-init: Version: 0.19.0 GitCommit:
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: