Skip to content

Missing .npmrc/.yarnrc file in the COPY instruction in the Dockerfile #17106

Description

@mihaon

Documentation Issue

Page: https://payloadcms.com/docs/production/deployment#docker
Section: Dockerfile

Actual line:

COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./

Expected line:

COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc .yarnrc ./

Explanation:
Running npm ci inside a Docker container without the .npmrc/.yarnrc file results in an "npm ci can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync" error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions