!!STOP RUNNING YOUR APPS (AND WEB BUILDS) AS ROOT!!
To use this source-to-image builder, your application will need to listen on 8080
when initialized via npm start
Build, Installation, Usage notes, and sources are all available at github.com/ryanj/origin-s2i-nodejs
Available Node.JS releases are listed as tags on this repo. The "latest" runtime builds are:
6.3.1
,6
,current
5.12.0
,5
4.4.7
,4
,lts
0.12.15
,0.12
0.10.46
,0.10
You can run a build (without requiring root context), using the s2i
command line tool:
s2i build https://github.com/ryanj/pillar-base ryanj/centos7-s2i-nodejs:current pillarjs
If you prefer using standard "docker build
" tooling, an ONBUILD
-style image is available at: ryanj/centos7-nodejs
OpenShift and the oc
command-line tool can also be used to schedule a NodeJS application build (and deployment) using tagged releases from this image:
oc new-app ryanj/centos7-s2i-nodejs:current~http://github.com/ryanj/pillar-base
For the official SCL-packaged NodeJS binaries, see github.com/sclorg/s2i-nodejs-container
Installation
OpenShift administrators can make these NodeJS releases available globally (visible in all projects, by all users) by adding them to the openshift
namespace:
oc create -n openshift -f https://raw.githubusercontent.com/ryanj/origin-s2i-nodejs/master/image-streams.json
To replace the default SCL-packaged openshift/nodejs
image (admin access required), run:
oc delete is/nodejs -n openshift ; oc create -n openshift -f https://raw.githubusercontent.com/ryanj/origin-s2i-nodejs/master/centos7-s2i-nodejs.json
Installation for OpenShift Online Next-Gen Developer Preview
Normal users, or those without admin privileges (as with OpenShift Online) can install the latest nodejs releases within their project context with:
oc create -f https://raw.githubusercontent.com/ryanj/origin-s2i-nodejs/master/image-streams.json
To ensure that each of the latest NodeJS release tags are available and displayed correctly in the web UI, try upgrading / reinstalling the imageStream:
oc delete is/centos7-s2i-nodejs ; oc create -f https://raw.githubusercontent.com/ryanj/origin-s2i-nodejs/master/image-streams.json
If you've (automatically) imported this image using the oc new-app
example command, then you may need to replace the auto-generated image stream reference (as described above) in order to gain access to the full list of nodejs runtime releases.