I am trying to build an image with a dockerfile that looks like this
FROM php:7.2-cli WORKDIR /usr/src/app COPY . . ENTRYPOINT ["php", "./my_script"]
which I build with
docker build -t test
and run with
docker run test "my_string_arg"
Now, this build happens in a directory with a number of different PHP scripts, of which
my_script is only one
my_script lies references to other scripts in the directory (via
Each of these other scripts is currently only referenced with a relative path, so a shell exec would look like
My issue is that when I
docker run I get errors saying
sh: 1: ./my_other_script: not found whereas when I run
./my_script normally in this directory (as in not part of any kind of docker container) it works as intended.
How should I be referencing these scripts?