A .dockerignore is the first file in a new Dockerfile's folder
Without it, COPY . . sends node_modules, .git and every local artefact to the build, which is slow and occasionally ships a secret.
node_modules
.git
.next
*.log
.env*Same syntax as .gitignore. The build context size is printed at the start of every build. If it is more than a few megabytes, this file is missing something.
docker