I am trying to write a simple dockerfile that wraps around a bash script. The docker file looks like this:
FROM openjdk:8-jre-alpine COPY . /build/demo WORKDIR /build/demo/ RUN pwd; ls RUN chmod +x run-demo.sh RUN run-demo.sh 1 zk and the context file directory (slimmed down) looks like:
- Dockerfile
- build
- demo
- run-demo.sh
- demo
I have a step RUN pwd; ls which outputs
RUN pwd; ls ---> Running in f22ce9175cee /build/demo run-demo.sh and yet once the docker build . reaches the last command, it says /bin/sh: run-demo.sh: not found. How is that possible? Thank you
edit: and the script begins with !#/bin/bash if thats relevant edit2:
RUN pwd; ls -l ---> Running in 16fbda2c19e1 /build/demo -rwxr-xr-x 1 root root 775 Jun 12 21:14 run-demo.sh Removing intermediate container 16fbda2c19e1 ---> bf8ada47953a Step 7/7 : RUN ./run-demo.sh 1 zk ---> Running in daccefe3c895 /bin/sh: ./run-demo.sh: not found