kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch14/docker-images/image-of-the-day/Dockerfile

17 lines
318 B
Docker
Raw Permalink Normal View History

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"]