# .dockerignore — Docker Fundamentals: Images, Containers and Compose

Source: https://www.skillbyai.com/en/docker/docker-dockerignore

> Speed up builds and avoid leaking secrets by excluding files from the build context with .dockerignore.

## Excluding files

Like `.gitignore`, a `.dockerignore` file keeps folders like `node_modules` and `.git` out of the build context — faster builds, smaller images, no leaked secrets.

```text
node_modules
.git
.env
dist
*.log
Dockerfile
.dockerignore
```
