Clutch

Portable Node development environment with Docker

Portable Node development environment with Docker
Average rating: 1
(2 votes)

If you read our blog, you could remember our article about Docker explained in details. But there are more and more details appearing every time. Today we would like to share with you a new one. Portable Node development environment with Docker.

To run a simple “Hello World!” Node app, the typical tutorial asks to:

  • Download and install Node
  • Download and install Yarn
  • To use different versions of Node, uninstall Node and install nvm
  • Install NPM packages globally

Each operating system has its own quirks making the aforementioned installations non-standard. However, access to the Node ecosystem can be standardized using Docker images.

You can gain access to the container OS with any of the following methods:

  • Using a single but long docker run command.
  • Using a Dockerfile combined with a short docker run command.
  • Using a Dockerfile in combination with Docker Compose.

Assuming that Node is not installed in your local system, you can use the local terminal to modify project structure and file content but you can’t issue any Node-related commands, such as yarn add. As the server runs within the container, you are also not able to make server requests to the internal container port 3000.

If you interested to know more, check here.

Don’t forget to read pur recent material about one of the new Node.js framework – Marble.js.

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111