Why does `docker image ls` not show the same result as `ctr image ls`?

289 views Asked by At

My problem is docker image ls shows some Docker images that do not exist in ctr image ls.

I check with default namespace and k8s namespace, but my Docker images do not exist in ctr image ls.

How can I resolve this problem? When using docker image load tarfile, I can't see this image in ctr image ls.

1

There are 1 answers

0
Qasim Sarfraz On

Docker doesn't use containerd as a image store unless you are running docker daemon with following configuration:

{
  "features": {
    "containerd-snapshotter": true
  }
}

So you won't be able to use ctr to list images for docker. But if you do enable containerd image store, you have to list images in moby containerd namespace:

$ ctr -n moby images ls