使用 docker exec -it 容器名/容器ID /bin/bash 进入容器报错

报错信息如下:

kv37xtro.png

1
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown

查看相应镜像发现镜像是使用alpine制作的

再次输入命令

1
docker exec -it 容器名/容器ID /bin/sh

进入成功