17 lines
318 B
Docker
17 lines
318 B
Docker
|
FROM maven:3.6.3-jdk-11 AS builder
|
||
|
|
||
|
WORKDIR /usr/src/iotd
|
||
|
COPY pom.xml .
|
||
|
RUN mvn -B dependency:go-offline
|
||
|
|
||
|
COPY . .
|
||
|
RUN mvn package
|
||
|
|
||
|
# app
|
||
|
FROM openjdk:11.0.11-jre-slim
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY --from=builder /usr/src/iotd/target/iotd-service-0.1.0.jar .
|
||
|
|
||
|
EXPOSE 80
|
||
|
ENTRYPOINT ["java", "-jar", "/app/iotd-service-0.1.0.jar"]
|