You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner. It is now read-only.
Repository navigation
This repository has been archived by the owner. It is now read-only.
onbuild variant should provide a way not to install devDependencies #14
Since there is no way to pass an environment variable at build there isn't really a way to handle this. We had a related discussion about passing --without to bundle install: docker-library/ruby#14. The only solution is to copy the onbuild steps and modify the applicable steps.
This could be an argument for the possibility of a node:0.10.31-onbuild-prod that has the flag, but either making your own Dockerfile or having this extra onbuild forces having two Dockerfiles and thus two images where one is production and one is dev.
I think we should force the user to make their own Dockerfile by copying the ~5 lines if they want a thinner production install, rather than providing another tag that is slightly different.
I suppose it depends on the expectations of the image. It would be nice to be able to base production images from some standard language stack images rather than starting from scratch. I'm personally OK with some space trade-off.
@jszwedko, we are thinking of making a node:slim variant to have minimal dependencies so that if a user is space conscious, then they have a solid base and can apt-get just the extra stuff that they need.
We don't have a nice way for a user to use the onbuild image but able to specify something like --production for npm.
Activity
yosifkit commentedon Sep 19, 2014
Since there is no way to pass an environment variable at build there isn't really a way to handle this. We had a related discussion about passing
--withoutto bundle install: docker-library/ruby#14. The only solution is to copy the onbuild steps and modify the applicable steps.This could be an argument for the possibility of a
node:0.10.31-onbuild-prodthat has the flag, but either making your ownDockerfileor having this extra onbuild forces having twoDockerfilesand thus two images where one is production and one is dev.I think we should force the user to make their own
Dockerfileby copying the ~5 lines if they want a thinner production install, rather than providing another tag that is slightly different.proppy commentedon Sep 23, 2014
what about only providing
node:prodthat point to:latest-onbuild?yosifkit commentedon Sep 23, 2014
I think that if a user is optimizing for production, then they should also optimize the apt installs and so start from just
debian:version.jszwedko commentedon Oct 1, 2014
I suppose it depends on the expectations of the image. It would be nice to be able to base production images from some standard language stack images rather than starting from scratch. I'm personally OK with some space trade-off.
yosifkit commentedon Oct 1, 2014
@jszwedko, we are thinking of making a
node:slimvariant to have minimal dependencies so that if a user is space conscious, then they have a solid base and can apt-get just the extra stuff that they need.We don't have a nice way for a user to use the
onbuildimage but able to specify something like--productionfor npm.jszwedko commentedon Oct 5, 2014
@yosifkit That would be perfect! It looks like the idea of an
:onbuild-prod(or slim) has been discussed, but I also wouldn't mind seeing that.proppy commentedon Oct 6, 2014
See #19 for the slim variant
Dockerfile: Don't use -onbuild because we want npm install --production
yosifkit commentedon Jan 22, 2015
This is solved by the
slimversions.