You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/blog/_posts/2020-12-02-dockershim-faq.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ runtime where possible.
140
140
141
141
Another thing to look out for is anything expecting to run for system maintenance
142
142
or nested inside a container when building images will no longer work. For the
143
-
former, you can use the [`crictl`][cr] tool as a drop-in replacement and for the
143
+
former, you can use the [`crictl`][cr] tool as a drop-in replacement (see [mapping from docker cli to crictl](https://kubernetes.io/docs/tasks/debug-application-cluster/crictl/#mapping-from-docker-cli-to-crictl)) and for the
144
144
latter you can use newer container build options like [img], [buildah], or
Copy file name to clipboardExpand all lines: content/en/docs/tasks/debug-application-cluster/crictl.md
+51-1Lines changed: 51 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,4 +356,54 @@ CONTAINER ID IMAGE CREATED STATE
356
356
See [kubernetes-sigs/cri-tools](https://github.com/kubernetes-sigs/cri-tools)
357
357
for more information.
358
358
359
-
359
+
## Mapping from docker cli to crictl
360
+
361
+
The exact versions for below mapping table are for docker cli v1.40 and crictl v1.19.0. Please note that the list is not exhaustive. For example, it doesn't include experimental commands of docker cli.
362
+
363
+
Warn: 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 script output parsing.
364
+
365
+
### Retrieve Debugging Information
366
+
367
+
{{< table caption="mapping from docker cli to crictl - retrieve debugging information" >}}
368
+
docker cli | crictl | Description | Unsupported Features
369
+
-- | -- | -- | --
370
+
`attach` | `attach` | Attach to a running container | `--detach-keys`, `--sig-proxy`
371
+
`exec` | `exec` | Run a command in a running container | `--privileged`, `--user`, `--detach-keys`
372
+
`images` | `images` | List images |
373
+
`info` | `info` | Display system-wide information |
374
+
`inspect` | `inspect`, `inspecti` | Return low-level information on a container, image or task |
375
+
`logs` | `logs` | Fetch the logs of a container | `--details`
376
+
`ps` | `ps` | List containers |
377
+
`stats` | `stats` | Display a live stream of container(s) resource usage statistics | Column: NET/BLOCK I/O, PIDs
378
+
`version` | `version` | Show the runtime (Docker, ContainerD, or others) version information |
379
+
{{< /table >}}
380
+
381
+
### Perform Changes
382
+
383
+
{{< table caption="mapping from docker cli to crictl - perform changes" >}}
384
+
docker cli | crictl | Description | Unsupported Features
385
+
-- | -- | -- | --
386
+
`create` | `create` | Create a new container |
387
+
`kill` | `stop` (timeout = 0) | Kill one or more running container | `--signal`
388
+
`pull` | `pull` | Pull an image or a repository from a registry | `--all-tags`, `--disable-content-trust`
389
+
`rm` | `rm` | Remove one or more containers |
390
+
`rmi` | `rmi` | Remove one or more images |
391
+
`run` | `run` | Run a command in a new container |
392
+
`start` | `start` | Start one or more stopped containers | `--detach-keys`
393
+
`stop` | `stop` | Stop one or more running containers |
394
+
`update` | `update` | Update configuration of one or more containers | `--restart`, `--blkio-weight` and some other resource limit not supported by CRI.
395
+
{{< /table >}}
396
+
397
+
### Supported only in crictl
398
+
399
+
{{< table caption="mapping from docker cli to crictl - supported only in crictl" >}}
400
+
crictl | Description
401
+
-- | --
402
+
`imagefsinfo` | Return image filesystem info
403
+
`inspectp` | Display the status of one or more pods
0 commit comments