blob: 5bf65f4287acde6204237b373a392a2eba583529 [file] [log] [blame]
Sylvain Desbureauxae7b27a2019-02-14 13:45:22 +01001# Building client html and js files
2FROM alpine:3.8 as builder
3
4RUN apk add --no-cache npm
5
6WORKDIR /opt/cds-ui/client/
7
8COPY client/package.json /opt/cds-ui/client/
9
10RUN npm install
11
12COPY client /opt/cds-ui/client/
13
14RUN npm run build
15
16
17# Building and creating server
18FROM alpine:3.8
19
20WORKDIR /opt/cds-ui/
21
22RUN apk add --no-cache npm
23
24COPY server/package.json /opt/cds-ui/
25
26RUN npm install
27
28COPY server /opt/cds-ui/
29COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
30
31RUN npm run build
32
33EXPOSE 3000
34
35CMD [ "npm", "start" ]