LinuxCommandLibrary

ctr

Containerd command-line client

TLDR

List all containers

$ ctr containers list
copy
List all images
$ ctr images list
copy
Pull an image
$ ctr images pull [image]
copy
Tag an image
$ ctr images tag [source_image]:[source_tag] [target_image]:[target_tag]
copy

SYNOPSIS

ctr [global options] command [arguments]

DESCRIPTION

ctr is the command-line client for containerd, the industry-standard container runtime. It provides low-level container and image management capabilities.
Unlike Docker CLI, ctr is designed for debugging and direct containerd interaction rather than general use. Kubernetes typically uses containerd through crictl instead.

PARAMETERS

containers list

List all containers
containers rm id
Remove a container
images list
List all images
images pull ref
Pull an image
images push ref
Push an image
images tag source target
Tag an image
run image containerid_
Run a container

CAVEATS

Low-level tool primarily for debugging. For Kubernetes environments, use crictl. For general Docker-like experience, use nerdctl. Requires root or containerd socket access.

HISTORY

ctr is part of containerd, which was originally developed by Docker Inc. and donated to the Cloud Native Computing Foundation (CNCF) in 2017. containerd became a graduated CNCF project and is now the standard container runtime for Kubernetes and many other platforms.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community