Mapping from dockercli to crictl

Note: This section links to third party projects that provide functionality required by Kubernetes. The Kubernetes project authors aren’t responsible for these projects, which are listed alphabetically. To add a project to this list, read the content guide before submitting a change. More information.

crictl is a command-line interface for CRI-compatible container runtimes. You can use it to inspect and debug container runtimes and applications on a Kubernetes node. crictl and its source are hosted in the cri-tools repository.

This page provides a reference for mapping common commands for the docker command-line tool into the equivalent commands for crictl.

Mapping from docker CLI to crictl

The exact versions for the mapping table are for docker CLI v1.40 and crictl v1.19.0. This list is not exhaustive. For example, it doesn’t include experimental docker CLI commands.

Note: The output format of crictl is similar to docker CLI, despite some missing columns for some CLI. Make sure to check output for the specific command if your command output is being parsed programmatically.

Retrieve debugging information

mapping from docker cli to crictl - retrieve debugging information
docker clicrictlDescriptionUnsupported Features
attachattachAttach to a running container—detach-keys, —sig-proxy
execexecRun a command in a running container—privileged, —user, —detach-keys
imagesimagesList images 
infoinfoDisplay system-wide information 
inspectinspect, inspectiReturn low-level information on a container, image or task 
logslogsFetch the logs of a container—details
pspsList containers 
statsstatsDisplay a live stream of container(s) resource usage statisticsColumn: NET/BLOCK I/O, PIDs
versionversionShow the runtime (Docker, ContainerD, or others) version information 

Perform Changes

mapping from docker cli to crictl - perform changes
docker clicrictlDescriptionUnsupported Features
createcreateCreate a new container 
killstop (timeout = 0)Kill one or more running container—signal
pullpullPull an image or a repository from a registry—all-tags, —disable-content-trust
rmrmRemove one or more containers 
rmirmiRemove one or more images 
runrunRun a command in a new container 
startstartStart one or more stopped containers—detach-keys
stopstopStop one or more running containers 
updateupdateUpdate configuration of one or more containers—restart, —blkio-weight and some other resource limit not supported by CRI.

Supported only in crictl

mapping from docker cli to crictl - supported only in crictl
crictlDescription
imagefsinfoReturn image filesystem info
inspectpDisplay the status of one or more pods
port-forwardForward local port to a pod
podsList pods
runpRun a new pod
rmpRemove one or more pods
stoppStop one or more running pods