forked from OpenBankProject/API-Explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
17 lines (14 loc) · 597 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Build as build stage named "maven"
FROM maven:3-jdk-8 as maven
WORKDIR /usr/src
COPY pom.xml .
COPY src src
# Copy default props file
COPY src/main/resources/props/sample.props.template src/main/resources/props/default.props
COPY src/main/resources/container.logback.xml.example src/main/resources/default.logback.xml
RUN --mount=type=cache,target=/root/.m2 mvn -e -B dependency:resolve
RUN --mount=type=cache,target=/root/.m2 mvn -e -B package
FROM jetty
# Copy source from maven build stage
COPY --from=maven /usr/src/target/API_Explorer-1.0.war /var/lib/jetty/webapps/root.war
EXPOSE 8080