-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
40 lines (20 loc) · 925 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM node:12-alpine as BUILD
ARG NODE_AUTH_TOKEN
ARG USER_CONTEXT_VER=0.5
ARG TANGO_REST_VER=2.2
RUN echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
RUN apk add --no-cache wget unzip
COPY . /src
WORKDIR /src
RUN npm install
RUN npm run build
RUN npm run war
RUN wget https://github.com/waltz-controls/user-context/releases/download/$USER_CONTEXT_VER/user-context.war
RUN wget https://github.com/hzg-wpi/rest-server/releases/download/rest-server-$TANGO_REST_VER/rest-server-$TANGO_REST_VER.zip
RUN unzip rest-server-$TANGO_REST_VER.zip
RUN mv rest-server-$TANGO_REST_VER/tango.war tango.war
FROM tomcat:9-jdk11
COPY --from=BUILD /src/dist/waltz.war /usr/local/tomcat/webapps
COPY --from=BUILD /src/user-context.war /usr/local/tomcat/webapps
COPY --from=BUILD /src/tango.war /usr/local/tomcat/webapps
COPY docker/tomcat/tomcat-users.xml docker/tomcat/server.xml /usr/local/tomcat/conf/