Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uponbuild 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.jsonif one exists. They way in which theDockerfilefor onbuild is structured, npm will never install fromnpm-shrinkwrap.json.https://github.com/nodejs/docker-node/blob/master/0.12/onbuild/Dockerfile#L6