-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 849 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 849 Bytes
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
FROM maven:3.8.6-openjdk-11-slim as builder
WORKDIR /app
# Building the SDK.
COPY pom.xml .
COPY src/main/resources src/main/resources
RUN mvn verify clean -f pom.xml
COPY src ./src
RUN mvn clean install -DskipTests=true
# Building the Demo app.
COPY web/pom.xml web/pom.xml
RUN mvn verify clean -f web/pom.xml
COPY web ./web
RUN mvn clean install war:war -DskipTests=true -f web/pom.xml
FROM tomcat:9.0.68
COPY --from=builder /app/web/target/web-1.0.0 /usr/local/tomcat/webapps/ROOT
## Enforcer configuration json file is located at:
## /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/src/main/resources/enforcer_config.json
COPY web/src/main/resources/ /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/src/main/resources
EXPOSE 8080
ENV CATALINA_OPTS="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
CMD ["catalina.sh", "run"]