WARN[0000] image connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead.
E0416 14:17:48.219277 19714 remote_image.go:119] "ListImages with filter from image service failed" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory\"" filter="&ImageFilter{Image:&ImageSpec{Image:,Annotations:map[string]string{},},}"
FATA[0000] listing images: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"
解决办法:
1:设置环境变量
export CONTAINER_RUNTIME_ENDPOINT=unix:///run/containerd/containerd.sock
export IMAGE_SERVICE_ENDPOINT=unix:///run/containerd/containerd.soci2k22
2: 创建/etc/crictl.yaml
# 指定 containerd 的运行时端点,使用本地 Unix 套接字进行通信
runtime-endpoint = "unix:///run/containerd/containerd.sock"
# 指定 containerd 的镜像端点,同样使用本地 Unix 套接字进行通信
image-endpoint = "unix:///run/containerd/containerd.sock"
# 设置操作的超时时间(单位为秒)
timeout = 2
# 是否开启调试模式
debug = false
# 是否在创建时立即拉取镜像
pull-image-on-create = false
3:编辑完写完之后重启containerd
systemctl restart containerd