简体   繁体   English

docker:来自守护程序的错误响应:无法调用容器命令“ ./run”

[英]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/26748bdf6f5e260dd6f6docker 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: 但是, Dockerfilerun脚本都在同一文件夹中,并且在我构建容器时,将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.

相关问题 Docker运行失败,来自守护程序的错误响应 - Docker run failed with Error response from daemon 来自守护程序的错误响应:从 openzim/zim-tools 的 Docker 映像运行命令时容器未运行 - Error response from daemon: Container is not running when running command from Docker image of openzim/zim-tools Docker:来自守护程序的错误响应 - 为什么它没有显示在 docker 容器 ls 中? - Docker: Error response from daemon - why is it not showing in docker container ls? 来自守护进程的错误响应:Docker 容器 [id] 未运行 - Error Response from daemon: Docker Container [id] is not running 启动Docker容器的“来自守护程序的错误响应:lstat…:没有此类文件或目录” - “Error response from daemon: lstat …: no such file or directory” starting a Docker container Docker 来自守护进程的错误响应:“冲突......容器已在使用” - Docker error response from daemon: "Conflict ... already in use by container" 启动docker容器时守护程序的错误响应 - Error response from daemon when starting a docker container 创建 hadoop 容器(Docker)时来自守护程序的错误响应 - Error response from daemon when creating hadoop container (Docker) 运行docker run时出错:来自守护程序的错误响应 - Getting error while running docker run :Error response from daemon 来自守护进程的错误响应:没有这样的容器: - Error response from daemon: No such container:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM