summaryrefslogtreecommitdiffstats
path: root/cds-ui/server/Dockerfile
diff options
context:
space:
mode:
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", "." ]