简体   繁体   中英

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..

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:

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. This is especially likely if you are working on a Windows host.

So, check whether run file has set Unix/Linux as Line Ending and also that has execution permissions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM