DEV Community

Discussion on: Using Docker for Node.js in Development and Production

Collapse
 
alex_barashkov profile image
Alex Barashkov

Hey @ohryan
1) yarn is the part of node docker image, that why it works for you
2) Actually I'm proposing try to unify Dev and prod dockerfiles if that's possible. In most of projects I worked in, they could be easily be the same
3) That's only one downside, after changing you dependencies you have to rebuild the image. Fortunately it mostly actively happens at the beginning of the project. But it always depends on your docker compose configuration, for example in my example goal was to make sure we only rely on docker on local machine, but with small changes you could change that approach to installation of node modules on local machine and then use them with docker.