NodeJS Builder image
This repository contains the source for building various versions of
the Node.JS application as a reproducible Docker image using
CentOS based builder images with Nodejs binaries from nodejs.org.
The resulting image can be run using Docker.
If you are interested in using SCL-based nodejs binaries, try sti-nodejs
$ s2i build https://github.com/ryanj/pillar-base ryanj/centos7-s2i-nodejs:current pillarjs
Run the resulting image with Docker:
$ docker run -p 8080:8080 pillarjs
Access the application:
$ curl 127.0.0.1:8080
CentOS based Dockerfile with 64bit nodejs binaries from nodejs.org.
CentOS based Dockerfile, nodejs binaries built from source (downloaded from nodejs.org).
This folder contains scripts that are run by STI:
Used to install the sources into the location where the application
will be run and prepare the application for deployment (eg. installing
modules using npm, etc.)
This script is responsible for running the application, by using the
application web server.
This script prints the usage of this image.
This folder contains a file with commonly used modules.
This folder contains the S2I
test framework with simple Node.JS echo server.
Application developers can use the following environment variables to configure the runtime behavior of this image:
|NPM_RUN||Select an alternate / custom runtime mode, defined in your
|NODE_ENV||NodeJS runtime mode (default: "production")|
|HTTP_PROXY||use an npm proxy during assembly|
|HTTPS_PROXY||use an npm proxy during assembly|
One way to define a set of environment variables is to include them as key value pairs in your repo's
NOTE: Define your own "
package.json example includes a
scripts.dev entry. You can define your own custom
NPM_RUN scripts in your application's
Using Docker's exec
To change your source code in a running container, use Docker's exec command:
$ docker exec -it <CONTAINER_ID> /bin/bash
After you Docker exec into the running container, your current directory is set to
/opt/app-root/src, where the source code for your application is located.
Using OpenShift's rsync
If you have deployed the container to OpenShift, you can use oc rsync to copy local files to a remote container running in an OpenShift pod.