-
Notifications
You must be signed in to change notification settings - Fork 2k
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
onbuild does not work with npm-shrinkwrap.json #65
Comments
Indeed. @nodejs/docker does anyone remember why we copy only P.S. Ah yes, it's done in order to take advantage of the build-cache. |
This is similar to what is suggested here which says that there are no optional copy:
This will fail for every project without an Option 1: Copy everything before installing:
This will effectively disable Docker's build-cache and all modules will have to be re-installed for each change to the source code. The reason we use Option 2: Make an
|
We do have a 4th option. Not saying that it is any good. Option 4: Use go's
|
I'm in favor of Option 3. |
It's only awkward since one would assume that Option 3 is fine as long as there is that additional documentation. |
Yeah, Option 3 seems like the best way to go. |
FWIW I think there is an option 5. Option 5: copy package.json and optionally the shrinkwrap
There would still a similar problem as with option 4, but the chance of having multiple files ending in The other thing I've noticed is if you have a |
npm installs packages from a
npm-shrinkwrap.json
if one exists. They way in which theDockerfile
for onbuild is structured, npm will never install fromnpm-shrinkwrap.json
.https://github.com/nodejs/docker-node/blob/master/0.12/onbuild/Dockerfile#L6
The text was updated successfully, but these errors were encountered: