【問題】使用docker exec + sh進入容器時報錯
[root@localhost home]# docker exec -it container-test bash OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown
【分析】
因爲鏡像系統不一,使用錯誤shell解釋器致使,可嘗試如下其中一種方案。linux
【解決】
docker exec -it container-test /bin/bash
docker exec -it container-test /bin/sh
docker exec -it container-test /bin/csh