Public | Automated Build

Last pushed: 2 hours ago
Short Description
Node.js for Development and Production
Full Description

Docker Runtime for Node.js Apps

Node.js is a JavaScript-based platform for server-side and networking applications.

What is Node.js?

Node.js is a software platform for scalable server-side and networking applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on Mac OS X, Windows, and Linux without changes.

Node.js applications are designed to maximize throughput and efficiency, using non-blocking I/O and asynchronous events. Node.js applications run single-threaded, although Node.js uses multiple threads for file and network events. Node.js is commonly used for real-time applications due to its asynchronous nature.

Node.js internally uses the Google V8 JavaScript engine to execute code; a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in, asynchronous I/O library for file, socket, and HTTP communication. The HTTP and socket support allows Node.js to act as a web server without additional software such as Apache.

What is this image?

When working with Node.js and Docker, there are two most common tasks that you will face:

  1. Local Node.js development with docker-compose;
  2. Building a production Docker image for your app.

This image is an attempt to solve both problems.

How to use this image?

Local development

When working with this image locally, all you need to do is to mount a folder with you source code to /app volume of the container.
This method is using node-supervisor package for live code reload.

Here is the docker-compose example:

  image: codexsystems/node
  restart: unless-stopped
    - ./:/app

Building an image for your app

That's simple. Really. Just add the following Dockerfile into the root of your app:

FROM codexsystems/node:onbuild

Then you can build the docker image with:

docker build -t yourname/app .

Then run it:

docker run -d yourname/app



This image is released under the MIT License. See the bundled for details.


Docker Pull Command
Source Repository