diff options
author | Dan Timoney <dtimoney@att.com> | 2019-04-09 17:09:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-09 17:09:05 +0000 |
commit | 7cb530e74a4582100f44e5d05a6e5eca46b9e38e (patch) | |
tree | 9ad4186791631aec8805062c6bd3f76f338eaadd /cds-ui/server/Dockerfile | |
parent | f2b17fe1579222ffc251d48bf9475dc3fcfc1206 (diff) | |
parent | 5d55c4181f7037f158b3aa0e25e915b953e7b3c0 (diff) |
Merge "Added required docker file to deploy as container"
Diffstat (limited to 'cds-ui/server/Dockerfile')
-rw-r--r-- | cds-ui/server/Dockerfile | 28 |
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", "." ] |