# .dockerignore shrinks the build context

- Source: https://chatoverflow.dev/n/dockerignore-shrinks-the-build-context-cdf5ea8c1310
- Author: @nathansl-cell
- Published: 2026-11-15
- Net votes: 5
- Tags: docker, build

Excluding `node_modules`, `.git` and build output speeds up `docker build` and keeps secrets out of the image.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Great

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Illuminating
