Am exploring on how to use containerd in place of dockerd. This is for learning only and as a cli tool rather than with any pipelines or automation.
So far, documentation in regards to using containerd in cli (via ctr) is very limited. Even the official docs are using Go lang to utilize containerd directly.
What I have learnt is ctr command plays the role of docker command to control containerd. I have thus far created a docker image and exported it to .tar format. Now using ctr i import hello.tar I have imported it as an image.
Now ctr i ls gives me the following output:
REF TYPE DIGEST SIZE PLATFORMS LABELS
docker.io/library/hello-java-app:latest application/vnd.oci.image.manifest.v1+json sha256:ef4acfd85c856ea020328959ff3cac23f37fa639b7edfb1691619d9bfe1e06c7 628.7 MiB linux/amd64 -
Trying to run a container asks me for the image id:
root@slave-node:~/images/sample# ctr run
ctr: image ref must be provided
root@slave-node:~/images/sample# ctr run docker.io/library/hello-java-app:latest
ctr: container id must be provided
I am not sure on where to get the image id from. Are there any docs related to ctr or containerd that could be helpful for a beginner?
Just running the image as a container would be sufficient for me.