In a Dockerfile, I have
COPY . .
I want to exclude an entire directory, in my case, node_modules directory.
Something like this:
For those using gcloud build:
gcloud build ignores .dockerignore and looks instead for .gcloudignore
gcloud build
.dockerignore
.gcloudignore
Use:
cp .dockerignore .gcloudignore
Source