Public | Automated Build

Last pushed: 3 days ago
Short Description
NodeJS container derived from Google Dockerfile, built on vrsystems/baseimage.
Full Description

VRT Systems Docker Node.js

vrtsystems/nodejs is a docker image based on 'vrtsystems/baseimage' that bundles Node.js with a supervisord entrypoint.

It is intended to be used to build other application-specific images for VRT Systems projects (see below) and uses VRT's default /usr/local to host Node.js applications.

How to use this image

To create the image vrtsystems/nodejs, execute the following command on docker-nodejs folder:

docker build -t vrtsystems/nodejs .

The image alone won't do much, unless you mount a data volume or host directory
containing an application, or extend the image. Note that this image uses the path
/opt/node_app to host the application. For maximum portability, the image exports
the app path as an environment variable NODE_APP_PATH.

How to extend this image

With a Dockerfile

Create a Dockerfile in your nodejs application directory with the following content:

    FROM vrtsystems/nodejs

# Copy in the application (or use 'ADD .' with .dockerignore)
ADD package.json ${NODE_APP_PATH}/
ADD index.js ${NODE_APP_PATH}/

    && npm install \
    && /usr/local/sbin/

With custom startup/process supervision

The image uses supervisord to manage process starting, and provide process
supervision (restart on fail like npm forever). This means you shouldn't need to
provide the normal CMD and ENTRYPOINT commands in your Dockerfile.
The default launch configuration uses an unprivilged nodejs user by default.
If you need to alter the supervisord configuration, you can copy your own
supervisord.conf file to /etc/supervisor/conf.d/supervisord.conf.

Docker Pull Command
Source Repository