[英]bash: ./run: No such file or directory
Im new to docker. 我是Docker的新手。 I am starting the run
command with a script called r
, which has the following code 我使用名为r
的脚本启动run
命令,该脚本具有以下代码
proxy="--build-arg http_proxy=http://wwwcache.open.ac.uk:80 --build-arg https_proxy=http://wwwcache.open.ac.uk:80"
if [ "$http_proxy" == "" ]; then
proxy=
fi
docker build $proxy -t bi-tbcnn docker
docker run -v $(pwd):/e -w /e --entrypoint bash --rm -it bi-tbcnn -c ./run
When I execute r
I am getting the following error 当我执行r
时,出现以下错误
bash: ./run: No such file or directory
but when I directly execute the ./run command on my terminal is ok 但是当我直接在终端上执行./run命令时
I use Docker Toolbox on windows 我在Windows上使用Docker Toolbox
The project address is https://github.com/bdqnghi/bi-tbcnn 项目地址是https://github.com/bdqnghi/bi-tbcnn
thanks 谢谢
This is a known issue on docker for windows https://blogs.msdn.microsoft.com/stevelasker/2016/09/22/running-scripts-in-a-docker-container-from-windows-cr-or-crlf/ 这是Windows的Docker上的已知问题https://blogs.msdn.microsoft.com/stevelasker/2016/09/22/running-scripts-in-a-docker-container-from-windows-cr-or-crlf /
it seems you're facing an issue with Carriage Return(CR) and Line Feeds(LF) characters, maybe your code editor is changing the newline format automatically 似乎您遇到回车符(CR)和换行符(LF)字符的问题,也许您的代码编辑器正在自动更改换行符格式
can you to try open a bash session on the container and execute the script manually? 您可以尝试在容器上打开bash会话并手动执行脚本吗?
docker run -v $(pwd):/e -w /e --entrypoint bash --rm -it bi-tbcnn
root@a83fcd779f8e:/e# ./run
Please paste the output here 请在此处粘贴输出
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.