DEV Community

Discussion on: Dockerize your Development Environment for NodeJS

Collapse
 
timo_ernst profile image
Timo Ernst

I love Docker for prod deployments but when using it in dev environments it‘d have to rebuild and re-run the image every time I change something in the code in order to see the result, correct? Any solution to this?

Collapse
 
klamserdev profile image
Jakob Klamser

Actually no, in this example your volume is connected to the container. So every time you change something, for example, in server.js it automatically updates your "localhost".
I recommend trying out this setup ;)

Collapse
 
timo_ernst profile image
Timo Ernst

Oh, I didn’t notice that! That‘s a great way to solve this problem. Thanks, great post! :-)