aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/application/Dockerfile
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-26 12:44:59 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-26 17:37:31 +0000
commita298b9eeec90e7eb4499751ef17e8cc9f9d65111 (patch)
treedfa5641504c5bd82b2c6680c3fc5569be68ad0aa /cds-ui/application/Dockerfile
parent4aee3138b446163fe45d4a92758e16068132ac41 (diff)
Fix cds ui build
Change-Id: I0ce7472367348f044ef81f49613876083a2332ff Issue-ID: CCSDK-1177 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'cds-ui/application/Dockerfile')
-rw-r--r--cds-ui/application/Dockerfile35
1 files changed, 35 insertions, 0 deletions
diff --git a/cds-ui/application/Dockerfile b/cds-ui/application/Dockerfile
new file mode 100644
index 000000000..5bf65f428
--- /dev/null
+++ b/cds-ui/application/Dockerfile
@@ -0,0 +1,35 @@
+# Building client html and js files
+FROM alpine:3.8 as builder
+
+RUN apk add --no-cache npm
+
+WORKDIR /opt/cds-ui/client/
+
+COPY client/package.json /opt/cds-ui/client/
+
+RUN npm install
+
+COPY client /opt/cds-ui/client/
+
+RUN npm run build
+
+
+# Building and creating server
+FROM alpine:3.8
+
+WORKDIR /opt/cds-ui/
+
+RUN apk add --no-cache npm
+
+COPY server/package.json /opt/cds-ui/
+
+RUN npm install
+
+COPY server /opt/cds-ui/
+COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
+
+RUN npm run build
+
+EXPOSE 3000
+
+CMD [ "npm", "start" ]