Commit 8b421221 authored by Ben Anderson's avatar Ben Anderson

Edited DOckerfile

parent 9e79a4b5
FROM maven:3.6.0-jdk-11-slim AS build
COPY src /home/app/src
COPY pom.xml /home/app
RUN mvn -f /home/app/pom.xml clean package -DskipTests
FROM openjdk:11-jre-slim
COPY --from=build /home/app/target/inventory-0.0.1-SNAPSHOT.jar /usr/local/lib/inventory.jar
COPY target/inventory-0.0.1-SNAPSHOT.jar /usr/local/lib/inventory.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/usr/local/lib/inventory.jar"]
\ No newline at end of file
ENTRYPOINT ["java","-jar","/usr/local/lib/inventory.jar"]
# For local testing, comment the top part out and uncomment the bottom
# DO NOT commit to GL with the top part commented and/or the bottom part uncommnted!!!!!!
#FROM maven:3.6.0-jdk-11-slim AS build
#COPY src /home/app/src
#COPY pom.xml /home/app
#RUN mvn -f /home/app/pom.xml clean package -DskipTests
#
#FROM openjdk:11-jre-slim
#COPY --from=build /home/app/target/inventory-0.0.1-SNAPSHOT.jar /usr/local/lib/inventory.jar
#EXPOSE 8080
#ENTRYPOINT ["java","-jar","/usr/local/lib/inventory.jar"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment