When running docker build in the directory /X
and the Dockerfile exist in /X/path/to/docker/Dockerfile
, where should I place .dockerignore?
Is it /X/path/to/docker/.dockerignore
or /X/.dockerignore
.
.dockerignore file tells below but what exactly the root directory of the context is not clearly defined there.
Before the docker CLI sends the context to the docker daemon, it looks for a file named .dockerignore in the root directory of the context.