1

The running container displayed in output of docker ps -a could be seen in the output of ctr -n moby container ls. This container was created by the docker engine and one can view it in the same namespace (moby) with ctr CLI. I tried doing vice versa meaning - running a container using ctr CLI and checking if it is present in docker ps output. Result? Didn't find it.

Similar experiment was tried with the images as well, the image pull from ctr was not reflecting in the docker images output.

Is there a way I can use ctr commands to reflect the results in docker system output?

PS I tried giving moby namespace in ctr commands, tried giving rootfs as runc root in ctr command.

user33456
  • 11
  • 1

1 Answers1

0

Not optimal approach for the images part:

  1. List images in ctr:

sudo ctr -n=namespace image ls

  1. Export images from ctr:

sudo ctr -n=namespace image export image_name.tar path/to/the/ref:version

  1. Load it into Docker:

docker load --input image_name.tar