summaryrefslogtreecommitdiffstats
path: root/cds-ui/server/Dockerfile
diff options
context:
space:
mode:
authorChandan Ghosh <cghosh12@in.ibm.com>2019-04-09 15:18:05 +0530
committerTimoney, Dan (dt5972) <dtimoney@att.com>2019-04-09 12:43:18 -0400
commit5d55c4181f7037f158b3aa0e25e915b953e7b3c0 (patch)
tree87a47f39b643e0c981c21918418e424505bdacc5 /cds-ui/server/Dockerfile
parent4fade7ac50901b20d209975c8476b47301f2e840 (diff)
Added required docker file to deploy as container
Added required docker file to deploy as container Issue-ID: CCSDK-1209 Change-Id: Ib455cfee95f58ca759eefa6d06469d164930e3a3 Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
Diffstat (limited to 'cds-ui/server/Dockerfile')
-rw-r--r--cds-ui/server/Dockerfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/cds-ui/server/Dockerfile b/cds-ui/server/Dockerfile
new file mode 100644
index 000000000..bca90e201
--- /dev/null
+++ b/cds-ui/server/Dockerfile
@@ -0,0 +1,28 @@
+# Check out https://hub.docker.com/_/node to select a new base image
+FROM node:10-slim
+
+# Set to a non-root built-in user `node`
+USER node
+
+# Create app directory (with user `node`)
+RUN mkdir -p /home/node/app
+
+WORKDIR /home/node/app
+
+# Install app dependencies
+# A wildcard is used to ensure both package.json AND package-lock.json are copied
+# where available (npm@5+)
+COPY --chown=node package*.json ./
+
+RUN npm install
+
+# Bundle app source code
+COPY --chown=node . .
+
+RUN npm run build
+
+# Bind to all network interfaces so that it can be mapped to the host OS
+ENV HOST=0.0.0.0 PORT=3000
+
+EXPOSE ${PORT}
+CMD [ "node", "." ]