我正在尝试使用以下命令重新启动Docker
sudo docker restart a7f8ce75f51f
但我收到以下错误Error response from daemon: Cannot restart container a7f8ce75f51f: Cannot kill container
a7f8ce75f51f718c39828ef45e510e5380fee6d768a3496a251469f3afee650c: unknown error after kill:
runc did not terminate sucessfully: container_linux.go:392: signaling init process caused
"permission denied"
: unknown
该错误的原因可能是什么?我想使用此Docker Compose文件重新启动Docker:
version: '3'
services:
prisma:
network_mode: host
image: prismagraphql/prisma:1.34
restart: always
ports:
- "4455:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
databases:
default:
connector: mongo
uri: 'mongodb://localhost:27018'
最佳答案
我认为,该消息表明容器内的进程阻止了kill信号。
由于它是一个数据库容器,也许这是某种数据保护。
您可以尝试通过以下方式手动将其停止:
docker stop a7f8ce75f51f