I have a Docker repository with a project. The structure of the project looks like this:
I know that if I try to
ADD ../../../helpers/functions.sh in
/development/php7.1.2-mongodb/app/Dockerfile would throw the error
Forbidden path outside the build context, and I don’t want to have the
functions.sh file in each folder.
So my solution was:
ADD https://www.dropbox.com/s/c913p83c11unl8x/functions.sh?dl=1 /home/helpers/
But is this a good approach? Because my repository is public and users are using it.
Changing the context from
docker-compose.yml is excluded because I only use the
Dockerfile when I create automated builds on docker hub.