如何停止containerd/ctr中的容器

let*_*ive 5 docker containerd

使用 ctr相当于什么docker stop [containerID]?我似乎无法通过 contianer 选项找到它,或者我错过了一些 ctr 概念......

Kar*_*imH 7

检查正在运行的任务:

ctr task ls
Run Code Online (Sandbox Code Playgroud)

然后你会看到类似的东西

任务PID状态

v0      62166    RUNNING
Run Code Online (Sandbox Code Playgroud)

ctr task kill v0
Run Code Online (Sandbox Code Playgroud)

或者

ctr task kill -s SIGKILL v0
Run Code Online (Sandbox Code Playgroud)