Skip to content

Commit 36fa877

Browse files
authored
Merge pull request #46016 from ydFu/map-crictl-dockercli
[zh]Update mapping table for crictl and docker CLI commands
2 parents 54240f8 + 5487579 commit 36fa877

File tree

1 file changed

+12
-129
lines changed

1 file changed

+12
-129
lines changed

content/zh-cn/docs/reference/tools/map-crictl-dockercli.md

Lines changed: 12 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -10,137 +10,20 @@ content_type: reference
1010
weight: 10
1111
-->
1212

13-
{{% thirdparty-content %}}
14-
15-
<!--
16-
`crictl` is a command-line interface for {{<glossary_tooltip term_id="cri" text="CRI">}}-compatible container runtimes.
17-
You can use it to inspect and debug container runtimes and applications on a
18-
Kubernetes node. `crictl` and its source are hosted in the
19-
[cri-tools](https://github.com/kubernetes-sigs/cri-tools) repository.
20-
-->
21-
`crictl` 是兼容 {{<glossary_tooltip term_id="cri" text="CRI">}}的容器运行时的一种命令行接口。
22-
你可以使用它来在 Kubernetes 节点上检视和调试容器运行时和应用。
23-
`crictl` 及其源代码都托管在
24-
[cri-tools](https://github.com/kubernetes-sigs/cri-tools) 仓库中。
25-
26-
<!--
27-
This page provides a reference for mapping common commands for the `docker`
28-
command-line tool into the equivalent commands for `crictl`.
29-
-->
30-
本页面提供一份参考资料,用来将 `docker` 命令行工具的常用命令映射到
31-
`crictl` 的等价命令。
32-
33-
<!--
34-
## Mapping from docker CLI to crictl
35-
-->
36-
## 从 docker 命令行映射到 crictl {#mapping-from-docker-cli-to-crictl}
37-
38-
<!--
39-
The exact versions for the mapping table are for `docker` CLI v1.40 and `crictl`
40-
v1.19.0. This list is not exhaustive. For example, it doesn't include
41-
experimental `docker` CLI commands.
42-
-->
43-
映射表格中列举的确切版本是 `docker` 命令行的 v1.40 版本和 `crictl` 的 v1.19.0 版本。
44-
这一列表不是完备的。例如,其中并未包含实验性质的 `docker` 命令。
45-
4613
{{< note >}}
47-
<!--
48-
The output format of `crictl` is similar to `docker` CLI, despite some missing
49-
columns for some CLI. Make sure to check output for the specific command if your
50-
command output is being parsed programmatically.
51-
-->
52-
`crictl` 的输出格式类似于 `docker` 命令行,只是对于某些命令而言会有部分列缺失。
53-
如果你的命令输出会被程序解析,请确保你认真查看了对应的命令输出。
54-
{{< /note >}}
5514

5615
<!--
57-
### Retrieve debugging information
16+
This page is being directed to
17+
https://v1-24.docs.kubernetes.io/docs/reference/tools/map-crictl-dockercli/ because of the
18+
[removal of dockershim from crictl in v1.24](https://github.com/kubernetes-sigs/cri-tools/issues/870).
19+
As per our community policy, deprecated documents are not maintained beyond next three versions.
20+
The reason for deprecation is explained in [Dockershim-FAQ](https://kubernetes.io/blog/2020/12/02/dockershim-faq/).
5821
-->
59-
### 获得调试信息 {#retrieve-debugging-information}
22+
此页面被重定向到
23+
https://v1-24.docs.kubernetes.io/zh-cn/docs/reference/tools/map-crictl-dockercli/
24+
,原因是
25+
[dockershim 在 v1.24 中被从 crictl 中移除](https://github.com/kubernetes-sigs/cri-tools/issues/870)
26+
根据我们的社区政策,弃用的文档超过三个版本后不再维护。
27+
弃用的原因在 [Dockershim-FAQ](https://kubernetes.io/blog/2020/12/02/dockershim-faq/) 中进行了说明。
6028

61-
{{< table caption="docker 命令行与 crictl 的映射 - 获得调试信息" >}}
62-
<!--
63-
docker cli | crictl | Description | Unsupported Features
64-
-- | -- | -- | --
65-
`attach` | `attach` | Attach to a running container | `--detach-keys`, `--sig-proxy`
66-
`exec` | `exec` | Run a command in a running container | `--privileged`, `--user`, `--detach-keys`
67-
`images` | `images` | List images |  
68-
`info` | `info` | Display system-wide information |  
69-
`inspect` | `inspect`, `inspecti` | Return low-level information on a container, image or task |  
70-
`logs` | `logs` | Fetch the logs of a container | `--details`
71-
`ps` | `ps` | List containers |  
72-
`stats` | `stats` | Display a live stream of container(s) resource usage statistics | Column: NET/BLOCK I/O, PIDs
73-
`version` | `version` | Show the runtime (Docker, ContainerD, or others) version information |  
74-
-->
75-
docker CLI | crictl | 描述 | 不支持的功能
76-
-- | -- | -- | --
77-
`attach` | `attach` | 挂接到某运行中的容器 | `--detach-keys`, `--sig-proxy`
78-
`exec` | `exec` | 在运行中的容器内执行命令 | `--privileged`, `--user`, `--detach-keys`
79-
`images` | `images` | 列举镜像 |  
80-
`info` | `info` | 显示系统范围的信息 |  
81-
`inspect` | `inspect`, `inspecti` | 返回容器、镜像或任务的底层信息 |  
82-
`logs` | `logs` | 取回容器的日志数据 | `--details`
83-
`ps` | `ps` | 列举容器 |  
84-
`stats` | `stats` | 显示容器资源用量统计的动态数据流 | 列:NET/BLOCK I/O、PIDs
85-
`version` | `version` | 显示运行时(Docker、ContainerD 或其他)的版本信息 |
86-
{{< /table >}}
87-
88-
<!--
89-
### Perform Changes
90-
-->
91-
### 执行变更 {#perform-changes}
92-
93-
{{< table caption="docker 命令行与 crictl 的映射 - 执行变更" >}}
94-
<!--
95-
docker cli | crictl | Description | Unsupported Features
96-
-- | -- | -- | --
97-
`create` | `create` | Create a new container |  
98-
`kill` | `stop` (timeout = 0) | Kill one or more running container | `--signal`
99-
`pull` | `pull` | Pull an image or a repository from a registry | `--all-tags`, `--disable-content-trust`
100-
`rm` | `rm` | Remove one or more containers |  
101-
`rmi` | `rmi` | Remove one or more images |  
102-
`run` | `run` | Run a command in a new container |  
103-
`start` | `start` | Start one or more stopped containers | `--detach-keys`
104-
`stop` | `stop` | Stop one or more running containers |  
105-
`update` | `update` | Update configuration of one or more containers | `--restart`, `--blkio-weight` and some other resource limit not supported by CRI.
106-
-->
107-
docker CLI | crictl | 描述 | 不支持的功能
108-
-- | -- | -- | --
109-
`create` | `create` | 创建一个新容器 |  
110-
`kill` | `stop` (超时值为 0) | 杀死一个或多个运行中的容器 | `--signal`
111-
`pull` | `pull` | 从某镜像库拉取镜像或仓库 | `--all-tags`, `--disable-content-trust`
112-
`rm` | `rm` | 移除一个或者多个容器 |  
113-
`rmi` | `rmi` | 移除一个或者多个镜像 |  
114-
`run` | `run` | 在一个新的容器中执行命令 |  
115-
`start` | `start` | 启动一个或多个已停止的容器 | `--detach-keys`
116-
`stop` | `stop` | 停止一个或多个运行中的容器 |  
117-
`update` | `update` | 更新一个或多个容器的配置 | `--restart``--blkio-weight` 以 CRI 所不支持的资源约束
118-
{{< /table >}}
119-
120-
<!--
121-
### Supported only in crictl
122-
-->
123-
### 仅被 crictl 支持的命令 {#supported-only-in-crictl}
124-
125-
{{< table caption="docker 命令行与 crictl 的映射 - 仅被 crictl 支持的命令" >}}
126-
<!--
127-
crictl | Description
128-
-- | --
129-
`imagefsinfo` | Return image filesystem info
130-
`inspectp` | Display the status of one or more pods
131-
`port-forward` | Forward local port to a pod
132-
`pods` | List pods
133-
`runp` | Run a new pod
134-
`rmp` | Remove one or more pods
135-
`stopp` | Stop one or more running pods
136-
-->
137-
crictl | 描述
138-
-- | --
139-
`imagefsinfo` | 返回镜像文件系统信息
140-
`inspectp` | 显示一个或多个 Pod 的状态
141-
`port-forward` | 将本地端口转发到 Pod
142-
`pods` | 列举 Pod
143-
`runp` | 运行一个新的 Pod
144-
`rmp` | 删除一个或多个 Pod
145-
`stopp` | 停止一个或多个运行中的 Pod
146-
{{< /table >}}
29+
{{</ note >}}

0 commit comments

Comments
 (0)