Closed itsamenathan closed 9 years ago
This looks good. I was reading an article just a few days ago that described this process. One downside to doing it this way is that you don't automatically get package upgrades when you build your image, but that could also be seen as an upside ;) If we ever wanna update the packages that are stored within the image, we can just run the docker build process with cache disabled.
:+1:
we still need to make sure that node_modules is not copied from the source repo if the person is building the docker image after they have already run npm install
. But that is recorded in #21 and can be fixed in a separate PR
@itsamenathan I invited you to the org. You can merge this yourself :wink:
@itsamenathan add a .dockerignore
file with node_modules
this PR will close #21 now too, then. Thanks @itsamenathan :+1:
well, i say that, but I think "running npm as root" is still an issue. Probably best to leave #21 open till we address that one way or the other.
npm install is done separately and copy to working dir. This way rebuilds are much faster.