Welcome to the Linux Foundation Forum!

Lab 7.3 command for listing images

in Lab 7.3 it says Versions can be seen with this command: sudo docker image ls nginx
If we haven't installed docker it should be

sudo crictl -i unix:///run/containerd/containerd.sock images

note in crictl help it says
--image-endpoint value, -i value Endpoint of CRI image manager service (default: uses 'runtime-endpoint' setting) [$IMAGE_SERVICE_ENDPOINT]
--runtime-endpoint value, -r value Endpoint of CRI container runtime service (default: uses in order the first successful one of [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]). Default is now deprecated and the endpoint should be set instead.[$CONTAINER_RUNTIME_ENDPOINT]

Comments

  • What is your question? Or is it just a comment on documentation/labs?

  • The question is, if we do not have docker installed, how do we query "sudo docker image ls nginx"
    crictl only seems to tell me about local images, not remote. If I want to list the versions, how do I do it.

  • chrispokorni
    chrispokorni Posts: 2,116

    Hi @thomasking156,

    Listing local cached images, similar to the docker image ls command can be achieved with crictl images. To list the tags of a local image run crictl images | grep imagename

    Regards,
    -Chris

Categories

Upcoming Training