-
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
switch to buildpack-deps-scm+gcc for the default variant #4
Comments
I like the idea of trimming things down. buildpack-deps is pretty big. I lean towards something like The trick is figuring out what needs to be installed on top of buildpack-deps:jessie-scm |
I think at minimum we want gcc + what's strictly required to build a node package with some cpp code in it (v8 headers?). You might want to extend that to commonly used C library, but I think that's a subset that is difficult to infer unless you run some stats on the whole npm archive dependency tree. |
I wonder if npm has some publicly available stats that could help here? |
It seems that one could replicate the archive from https://skimdb.npmjs.com/registry to a local couchdb, and run some mapreduce on it :) See http://blog.npmjs.org/post/75707294465/new-npm-registry-architecture |
It's so easy, @proppy is volunteering to do it. 😉
|
Actually it seems that npm/package.json doesn't surface native dependencies, see for example: |
Oh, that's unfortunate 😞 |
it would be at least nice to move to the -scm buildpack deps so that git uris work in package.json |
Oh, they don't currently work in the default variant? That's surprising since it uses |
GIT should work in the normal one, but maybe not in the |
oh I was using the slim. sorry about that. |
Ah, ok that explains it :) |
This appears to be two separate issues.
Would basing off of something other than the default |
I think the original the request was to change the base images to use The slim variant and the eventual Alpine variant pretty much address the image size issue though. I think, in terms of the current base images, we're stuck with |
Are we ok to close this out? I think ultimately we decided that we can't switch to |
I just ran into an issue with node-openzwave-shared which depends on compiling OpenZWave. I've tracked this down to Debian Jessie GCC package being one version behind what was needed I think. I've been looking around how to fix this but not had much luck, seems I might need to use Stretch or find some way to get GCC5 installed instead, is there a suitable official node docker image for this? I raised an issue on the repo if any of the information helps clarify the problem. |
@polarathene there is no official Node image with Stretch. You could try modifying the Jessie Dockerfile and building such an image yourself (replace |
Closing this out since switching to buildpack-deps:jessie-scm would lead breakage and the slim and alpine variants address the image size concerns. |
Now that we have more granular buildpack-deps, I'd like to discuss switching to buildpack-scm+gcc (and maybe later buildpack-gcc see docker-library/buildpack-deps#17) for the default variant.
The rational I'd like to defend here, is that user of the default image should never have to modify their
Dockerfile
in order tonpm install
self contained native dependencies that doesn't require a 3rd party library/headers, but that paying the tax of 400MB of C libraries (currently inbuildpack-deps
) you might not care about could be a hard price to pay (both for the first pull/push) for that "feature"The
:slim
version is not really a good fit either, as figuring out the set of dependencies for build C extensions to add on top (after #2 was merged) is not necessarily well know of casual users.It sounds like it could be useful to provide a more granular base image offering:
FROM node
node + what's necessary to build C deps + debianFROM node:buildpack
node + popular C libraries + debianFROM node:slim
node + busybox-opkg? or evenSCRATCH
? :)What do you think?
/cc @tianon @automaticali
The text was updated successfully, but these errors were encountered: