DEV Community

Ramiro for Auth0

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

8 4

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

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay