-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove node_modules when no node runtime is installed in the image ? #111
Comments
Hey! The |
No this is not the case for me, I think the docker ignored files only apply when copying from the host to the container but not when copying from one container to another. Don't you have the folder in your containers ? I can try to make a reproductible case if needed. |
Here's an easy reproduction :
|
So I digged a bit more and indeed, the My naive solution to fix this would be to |
I'm surprised this hasn't been noticed before. Perhaps run the |
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 ? )
The text was updated successfully, but these errors were encountered: