无法停止 Docker 容器

无法停止 Docker 容器

docker stop --time 60 662638cf5d5e什么也不输出,只是挂起

docker ps -a输出:

CONTAINER ID   IMAGE                          COMMAND                  CREATED        STATUS                    PORTS                                                 NAMES
662638cf5d5e   haugene/transmission-openvpn   "dumb-init /etc/open…"   17 hours ago   Up 17 hours (unhealthy)   8118/tcp, 0.0.0.0:9091->9091/tcp, :::9091->9091/tcp   funny_poincare

docker inspect输出内容包括:

       "Health": {
                "Status": "unhealthy",
                "FailingStreak": 100,
                "Log": [
                    {
                        "Start": "2021-10-22T09:36:05.832794985Z",
                        "End": "2021-10-22T09:36:05.978482291Z",
                        "ExitCode": -1,
                        "Output": "OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown"
                    },
                    {
                        "Start": "2021-10-22T09:37:06.011988214Z",
                        "End": "2021-10-22T09:37:06.102248362Z",
                        "ExitCode": -1,
                        "Output": "OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown"
                    },
                    {
                        "Start": "2021-10-22T09:38:06.129147083Z",
                        "End": "2021-10-22T09:38:06.278444444Z",
                        "ExitCode": -1,
                        "Output": "OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown"
                    },
                    {
                        "Start": "2021-10-22T09:39:06.324980588Z",
                        "End": "2021-10-22T09:39:06.485430674Z",
                        "ExitCode": -1,
                        "Output": "OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown"
                    },
                    {
                        "Start": "2021-10-22T09:40:06.515120555Z",
                        "End": "2021-10-22T09:40:06.671308913Z",
                        "ExitCode": -1,
                        "Output": "OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown"
                    }
                ]
            }
        },

docker container exec -it 662638cf5d5e /bin/bash输出:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown

uname -a输出:

Linux redacted 5.11.0-1021-raspi #22-Ubuntu SMP PREEMPT Wed Oct 6 17:30:38 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

docker --version输出:

Docker version 20.10.9, build c2ea9bc

答案1

我在 macOs 上的 Docker Desktop 上遇到了非常类似的问题。

重新启动 Docker Desktop 是唯一的解决方案 — — 对我来说有效。

相关内容