docker找不到路徑是因為內置的shell命令,不能將其設置為運行的命令,其解決辦法就是使用“docker exec -it a1 bash -c “””命令。
本教程操作環境:windows7系統、Docker 20.10.11版、Dell G3電腦。
docker 找不到路徑怎么辦?
問題描述:
docker exec 系統找不到指定的路徑
>docker?exec?-it?a1?echo?"hello..."?>?/var/www/html/index.html 系統找不到指定的路徑。 >docker?exec?-it?a1?bash?-c?'echo?"hello..."?>?/var/www/html/index.html' 系統找不到指定的路徑。 >docker?exec?-it?a1?bash?-c?"echo?'hello...'?>?/var/www/html/index.html" >docker?exec?-it?a1?cat?/var/www/html/index.html hello...
解決辦法:
內置的shell命令,不能將其設置為運行的命令.必須使用:docker exec -it a1 bash -c “
推薦學習:《docker視頻教程》
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦