Containerd提供了一组命令行工具,用于管理容器运行时的各个方面。以下是一些常用的Containerd命令:
-
ctr:
ctr
是Containerd的主要命令行工具,用于执行各种容器操作。一些常用的ctr
命令包括:ctr containers list
:列出当前正在运行的容器。ctr images list
:列出已下载的镜像。ctr tasks list
:列出当前正在运行的任务(即容器)。ctr container start <container_id>
:启动指定的容器。ctr container stop <container_id>
:停止指定的容器。ctr container delete <container_id>
:删除指定的容器。
-
ctr插件:Containerd可以通过插件来扩展其功能。一些常见的插件命令包括:
ctr plugins ls
:列出已安装的插件。ctr plugins enable <plugin_name>
:启用指定的插件。ctr plugins disable <plugin_name>
:禁用指定的插件。
-
ctr image&#x