I am new to docker and I just wanted to copy the shellscript inside the container and I wanted to execute the shellscript.
Dockerfile:
FROM amazonlinux
WORKDIR /opt
ADD ./test_Install.sh /opt/test_Install.sh
RUN chmod 777 /opt/test_Install.sh
WORKDIR /
RUN ./test_Install.sh
Build image: docker build -t "testinstallscript:dockerfile" .
When I use the command "docker build -t "testinstallscript:dockerfile" ." I get the following error:
standard_init_linux.go:178: exec user process caused "no such file or directory"
The command '/opt/test_Install.sh' returned a non-zero code: 1
Can anyone tell me what i am doing wrong here?
RUNis for, change it toENTRYPOINTorCMD../opt/test_Install.shit seemsWORKDIRto/optbutRUNstill needs to be changed.