I'm doing something extremely simple.  Here is my Dockerfile:
FROM alpine:latest
ADD hello.sh /bin/hello
RUN chmod +x /bin/hello
CMD /bin/hello
Then I build the image:
docker build -t hello .
Then I run the image:
docker run hello
And here is the output:
/bin/sh: /bin/hello: not found
Why is this happening? If I run:
docker run hello cat /bin/hello
I can see the content of my script, which makes me even more confused.
Dockerfilethat alpine came from, and we can give more specifics?docker run -it hello bash, and then runninghelloonce inside of the container (and post the output). That would tell us if theentrypointand/orCMDfor the image is doing something strange. The reason why your second example would have worked is because it was overriding theCMDof the Dockerfile specifically.