vercel / vercel/next.js

Example Dockerfile does not copy .npmc / .yarnrc files

Open
#71,827 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

examples
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Verify canary release
  • I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32566
  Available CPU cores: 16
Binaries:
  Node: 20.12.2
  npm: N/A
  Yarn: N/A
  pnpm: 9.10.0
Relevant Packages:
  next: 14.2.10 // An outdated version detected (latest is 15.0.1), upgrade is highly recommended!
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: standalone
Which example does this report relate to?

with-docker

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Currently example Dockerfile does not try to copy .npmrc / .yarnrc files which can lead to issues when installing packages

Expected Behavior

Example Dockerfile should attempt to copy those configuration files just like it attempts to copy the lock files

To Reproduce
  1. Add a package from a private registry to your NextJS project
  2. Copy the example Dockerfile into your project
  3. Attempt to build the docker image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the Dockerfile for the with-docker example and compare how it handles lock files with the package-manager configuration files named in the issue. Verify the example can build a project that uses a private registry, and consider the work complete when those configuration files are handled during the image build.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.