FerryDocs

Node.js

What the generated Dockerfile does for a Node.js project, when you set no build or start command.

Edit on GitHub

Base image. The image is node:<major>-alpine. A Bun project uses oven/bun:1-alpine.

1 / 4
The Node.js Dockerfile

The defaults

StepWhat Ferry does
Node.js versionIt comes from engines.node in package.json. Ferry uses 22 when the range allows it. If not, Ferry uses the newest major version that the range allows.
Package managerThe comes from the packageManager field or the : npm, Yarn, pnpm or Bun. Yarn and pnpm run through Corepack.
Install with npmnpm ci when there is a package-lock.json. If not, npm install.
BuildThe build script of package.json, if there is one.
Startnpm start when there is a start script. With Yarn 2+: yarn start. With Bun: bun run start.
Start with no start scriptnode with the main file, server.js, index.js or app.js.

See the choice

Deploy log
==> Start command: npm start (the "start" script of package.json)

On this page