fly-apps / fly-apps/dockerfile-rails

Yarn handling in the Dockerfile doesn't account for modern installs

Open
#138 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
559
Forks
42
PR merge metrics
No merged PRs in 30d

Description

During the build, the dockerfile will pull across the `node_modules` directory to the final image. This has a few ramifications:

- Assumes Yarn 1/2 is being used
- Yarn 3 `pnp` stores packages in `.yarn` instead
- Yarn 3 can be set to use the `node_modules` linker which still stores packages in `node_modules`, but requires overriding through `.yarnrc.yml`, which is also not copied across in the Dockerfile

This should probably be a config option (yarn classic/modern):

Classic: copies `node_modules` across
Modern: copies `.yarn` and `.yarnrc.yml`, and respects `node-linker`, which means copying either `node_modules` or `.yarn` across

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.