I just started playing around with Docker yesterday and am having issues between the build environment and the run environment. Build wise I have issues like...
RUN install.sh
/bin/sh: 1: install.sh: Permission denied
the command '/bin/sh -c install.sh' returned a non-zero code: 126
or ...
RUN . sourceme.env
/bin/sh: 1: .: sourceme.env: not found
The command '/bin/sh -c . sourceme.env' returned a non-zero code: 2
I build using 'sudo docker build -t joes' and I run using 'sudo docker run -it joes'
The frustrating thing is that after build failure I can run it, see that I am in the working directory I expected, and run the command that failed during building successfully. So why the discrepancy?
This is on a linux system and I'm using 'FROM ubuntu:18.04'
To bypass the RUN install.sh error I used
RUN /bin/sh install.sh
which converts to
/bin/sh -c /bin/sh install.sh