This repository has been archived by the owner on Feb 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (39 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM registry.access.redhat.com/rhel7
# This image provides a Node.JS environment you can use to run your Node.JS applications.
EXPOSE 8080
# This image will be initialized with "npm run $NPM_RUN"
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
# file for possible values of NPM_RUN
ARG NODE_VERSION
ARG NPM_VERSION
ARG V8_VERSION
ENV NPM_RUN=start \
NODE_VERSION=${NODE_VERSION} \
NPM_VERSION=${NPM_VERSION} \
V8_VERSION=${V8_VERSION} \
NODE_LTS=false \
NPM_CONFIG_LOGLEVEL=info \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
HOME=/opt/app-root/src \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH \
DEBUG_PORT=5858 \
NODE_ENV=production \
DEV_MODE=false
LABEL io.k8s.description="Platform for building and running Node.js applications on OpenShift" \
io.k8s.display-name="Node.js $NODE_VERSION" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,nodejs,nodejs-$NODE_VERSION" \
io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \
io.s2i.scripts-url=image:///usr/libexec/s2i \
com.redhat.deployments-dir="/opt/app-root/src" \
name="bucharestgold/rhel7-s2i-nodejs" \
maintainer="Lance Ball <lball@redhat.com>"
COPY ./s2i/ /usr/libexec/s2i
COPY ./contrib/ /opt/app-root
RUN /opt/app-root/etc/install_node.sh
RUN useradd -u 1001 -r -g 0 -d ${HOME} -s /sbin/nologin \
-c "Default Application User" default && \
chown -R 1001:0 /opt/app-root
USER 1001
# Set the default CMD to print the usage
CMD /usr/libexec/s2i/usage