【解決】OCI runtime exec failed......executable file not found in $PATH": unknown


 

【問題】使用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解釋器導致,可嘗試以下其中一種方案。

 

【解決】

docker exec -it container-test /bin/bash

docker exec -it container-test /bin/sh

docker exec -it container-test /bin/csh


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM