# Optimal Dockerfiles for Node.js (https://depot.dev/docs/container-builds/optimal-dockerfiles/node)

We've assembled some optimal Dockerfiles for building Docker images for Node.js using different package managers. These Dockerfiles are what we recommend when building Docker images for Node applications, but they are not the only way to do it, so your mileage may vary.

## Guides

* [Dockerfile for Node.js using `npm`](/docs/container-builds/optimal-dockerfiles/node-npm-dockerfile)
* [Dockerfile for Node.js using `pnpm`](/docs/container-builds/optimal-dockerfiles/node-pnpm-dockerfile)

## For AI Agents

The full site index is at [llms.txt](https://depot.dev/llms.txt). Append `.md` to any documentation, blog, changelog, or customer URL to fetch its markdown source directly.