DEV Community

Ramiro for Auth0

Posted on • Updated on • Originally published at auth0.com

Use Docker to Create a Node Development Environment

In this tutorial, instead of creating and running a Node app locally, you'll to take advantage of the Debian Linux operating system that official Docker Node images are based on.

You'll create a portable Node development environment that solves the "But it runs on my machine" problem that constantly trolls developers since containers are created predictably from the execution of Docker images on any platform.

Read on 🐳

Use Docker to Create a Node Development Environment

Top comments (3)

Collapse
 
jrock2004 profile image
John Costanzo

You should never ever use latest. This is extremely bad practice. You should set it to a specific version. Another thing you can do to improve is to not sync your node modules folder with your host. As your app grows it going to cause all types of slow downs.

Collapse
 
lucaball profile image
Lucas Ballyn

I agree with never using latest.

But I have a question about not syncing your node_modules. Won't your editor have problems with autocomplete & suggesting of functions and so from code that's in your node_modules? As you don't have that on your host?

Collapse
 
jrock2004 profile image
John Costanzo

After the containers start you run npm install on the host.