How can I include files from outside of Docker\'s build context using the \"ADD\" command in the Docker file?
From the Docker documentation:
T
The trick is to recognize that you can specify the context in the build command to include files from the parent directory if you specify the Docker path, I'd change my Dockerfile to look like this:
...
COPY ./ /dest/
...
Then my build command can look like this:
docker built -t TAG -f DOCKER_FILE_PATH CONTEXT
From the project directory
docker built -t username/project[:tag] -f ./docker/Dockerfile .
From project/docker
docker built -t username/project[:tag] -f ./docker/Dockerfile ..