Skip to content
This repository has been archived by the owner. It is now read-only.
This repository has been archived by the owner. It is now read-only.

onbuild variant should provide a way not to install devDependencies #14

Closed

Description

@proppy

npm support a --production flag, but due to the limitation of ONBUILD, I'm not sure how we can give the user some control on that downstream.

Activity

  1. yosifkit commented on Sep 19, 2014

    @yosifkit
    Member

    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.

  2. proppy commented on Sep 23, 2014

    @proppy
    Author

    what about only providing node:prod that point to :latest-onbuild?

  3. yosifkit commented on Sep 23, 2014

    @yosifkit
    Member

    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.

  4. jszwedko commented on Oct 1, 2014

    @jszwedko

    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.

  5. yosifkit commented on Oct 1, 2014

    @yosifkit
    Member

    @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.

  6. jszwedko commented on Oct 5, 2014

    @jszwedko

    @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.

  7. proppy commented on Oct 6, 2014

    @proppy
    Author

    See #19 for the slim variant

  8. yosifkit commented on Jan 22, 2015

    @yosifkit
    Member

    This is solved by the slim versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions