[英]docker: Error response from daemon: Container command './run' could not be invoked
I tried to use this Dockerfile ( https://gist.github.com/audy/26748bdf6f5e260dd6f6 ) in the following way docker run -d --net=host --privileged=true -v /mnt/data:/export sort
, but received docker: Error response from daemon: Container command './run' could not be invoked..
我尝试通过以下方式使用此Dockerfile( https://gist.github.com/audy/26748bdf6f5e260dd6f6 )
docker run -d --net=host --privileged=true -v /mnt/data:/export sort
,但收到docker: Error response from daemon: Container command './run' could not be invoked..
However, the Dockerfile
and the run
script are both in the same folder and when I built the container run
was added successfully to the container: 但是,
Dockerfile
和run
脚本都在同一文件夹中,并且在我构建容器时,将run
成功添加到了容器中:
Step 15 : ADD ./run .
---> f6972313a004
Removing intermediate container 24d92f7e81df
Step 16 : EXPOSE 8080
---> Running in ee6f9345a3c5
---> 6dc9d4ca0d61
Removing intermediate container ee6f9345a3c5
Step 17 : ENTRYPOINT ./run
---> Running in a3243dae9c82
---> 2bde541f1c91
Removing intermediate container a3243dae9c82
Successfully built 2bde541f1c91
What did I do wrong? 我做错了什么?
Thank you in advance. 先感谢您。
Mic 麦克风
Typically this kind of errors are due to file format issues with the script, for example when the script has fileformat=dos
and it is tried to run on Linux system (the one running in the docker container) there are ^M
characters in it. 通常,这种错误是由于脚本的文件格式问题引起的,例如,当脚本具有
fileformat=dos
并尝试在Linux系统(在docker容器中运行的系统)上运行时,其中包含^M
字符。 This is especially likely if you are working on a Windows host. 如果您在Windows主机上工作,这尤其可能。
So, check whether run
file has set Unix/Linux
as Line Ending and also that has execution permissions. 因此,检查
run
文件是否已将Unix/Linux
设置为Line Ending,并且是否具有执行权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.