Closed proppy closed 10 years ago
Aren't there a fair number of Node modules that do require development headers? I think in my testing I ran into a few, but I don't recall for certain.
I'm definitely in favor of node:slim
variations, but I think the jury is still out on whether that's a reasonable default and I need some convincing.
@tianon maybe we could write something against the npm API that try to :onbuild
and see which one fails :)
If we found out that some headers are used by a majority of packages (I suspect the set will be different from language like ruby), we could always add them to the node
base instead of buildpack-deps
so it doesn't bloat every downstream images.
In addition, when and if https://github.com/docker/docker/issues/8240 is accepted, we will have a way to apt-get install
headers in :onbuild
image without screwing the cache.
@proppy what do you mean with "write something against the npm API that try to :onbuild and see which one fails"? Do want to check all the npm installable packages for external dependencies?
The extra benefit of the buildpack-deps
image is deduplication on servers running multiple languages, like ruby, node, and python.
I suggest we start making :slim
versions that contain the minimal to run the language.
@proppy what do you mean with "write something against the npm API that try to :onbuild and see which one fails"? Do want to check all the npm installable packages for external dependencies?
Yes, I though it'be interesting to probe the npm archive for external dependencies through its API (if such a thing exists).
The extra benefit of the buildpack-deps image is deduplication on servers running multiple languages, like ruby, node, and python.
But it does come at the cost of a few hunders MB.
I'd argue that most of the :onbuild
deelopers for nodejs will be pure javascript web app and won't benefit from those headers much. (If you do need the headers, it is simple enough to base your image on FROM node
and do the apt-get install
yourself, similarly to what you suggested on #14),
PTAL refactored the change to create a slim variant, instead of modifying the default.
We can then discuss what should be the default for FROM node
in another thread.
rebased.
added 0.8 slim variant PTAL!
LGTM
Fair @yosifkit; let's make a new PR to add that to "all the things" :smile:
Main changes are: