fly-apps / fly-apps/dockerfile-rails
Remove node_modules when no node runtime is installed in the image ?
- Dominant language
- Dockerfile
- Stars
- 559
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
In some cases (when grover is present for exemple) we need a node runtime to be able to launch some JS deps from ruby.
But, when no node runtime is installed, `node_modules` still lingers in the final image, which can consume a lot space.
I was wondering if this was on purpose, or if we could indeed remove the node_modules folder in this specific case ?
If so, I'm happy to write a PR for it if you give me some pointers on the preferred way to do it (just rm -r ? tweak the COPY statement ? )
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test is named in the issue. Trace the generator logic that adds Node dependencies to the image, then inspect the resulting image with and without a Node runtime; done means node_modules is absent when no runtime is installed and remains available when JavaScript dependencies need it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile, node.js, ruby
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100