docker / cli

The Docker CLI
Apache License 2.0
4.88k stars 1.92k forks source link

docker images cannot see crictl pulled images #5120

Closed ttc0419 closed 3 months ago

ttc0419 commented 4 months ago

Description

Docker images cannot see crictl pulled images. How to make containerd cri images visible to docker?

Reproduce

  1. pull images using crictl in alpine vm

  2. crictl on guest vm:

    [root@lima-alpine ~]# crictl images
    IMAGE                             TAG                 IMAGE ID            SIZE
    k8s.nju.edu.cn/pause              3.9                 829e9de338bd5       268kB
    quay.io/cilium/cilium             <none>              507921ec66187       197MB
    quay.io/cilium/operator-generic   <none>              17efe355c81d4       24.2MB
  3. docker on host Mac:

    [u@h d]% docker images
    REPOSITORY   TAG       IMAGE ID   CREATED   SIZE

Expected behavior

No response

docker version

Client: Docker Engine - Community
 Version:           26.1.3
 API version:       1.45
 Go version:        go1.22.3
 Git commit:        b72abbb6f0
 Built:             Thu May 16 07:47:24 2024
 OS/Arch:           darwin/arm64
 Context:           alpine

Server:
 Engine:
  Version:          26.1.3
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.22.3
  Git commit:       8e96db1c328d0467b015768e42a62c0f834970bb
  Built:            Sat May 18 05:00:09 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.17
  GitCommit:        3a4de459a68952ffb703bbe7f2290861a75b6b67
 runc:
  Version:          1.1.12
  GitCommit:        51d5e94601ceffbbd85688df1c928ecccbfa4685
 docker-init:
  Version:          0.19.0
  GitCommit:

docker info

Client: Docker Engine - Community
 Version:    26.1.3
 Context:    alpine
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 26.1.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3a4de459a68952ffb703bbe7f2290861a75b6b67
 runc version: 51d5e94601ceffbbd85688df1c928ecccbfa4685
 init version: 
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.32-0-virt
 Operating System: Alpine Linux v3.20
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 5.786GiB
 Name: lima-alpine
 ID: 38da9778-7d5d-4ee5-8a71-6fe7126963fa
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

No response

ttc0419 commented 3 months ago

It turns out docker engine does not use containerd to store images, refer to https://docs.docker.com/storage/containerd/ for more info.