0

The output for microk8s.ctr image ls --help gives:

NAME:
   ctr images list - list images known to containerd

USAGE:
   ctr images list [command options] [flags] [<filter>, ...]

DESCRIPTION:
   list images registered with containerd

OPTIONS:
   --quiet, -q  print only the image refs

I can't find a doc anywhere that describes how to define the filter. How does one do this? For instance, where the ref includes "kafa" in the string.

mconner
  • 1,174
  • 3
  • 12
  • 24

1 Answers1

0

You have to provide a filter using quotes and an operator ("=="|"!="|"~=") for example:

microk8s ctr i ls "name~=kafa"
L_J
  • 2,351
  • 10
  • 23
  • 28
  • This does not work. If I do: `microk8s ctr images ls | grep kafka`, I get a number of entries, where kafka is in the REF column: `docker.io/bitnami/kafka:2.7.0-debian-10-r1`. If I do `microk8s ctr images ls "ref~=kafka"`, I get nothing, except the header. I get the same result if I try to filter on platforms or type, even with exact match. ` microk8s ctr images ls "platforms==linux/amd64"` yields only `REF TYPE DIGEST SIZE PLATFORMS LABELS` – mconner Apr 12 '21 at 14:00