Skip to content

Instantly share code, notes, and snippets.

@ptitbob
Created June 18, 2017 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ptitbob/39aaa935a0725ece5706484f36fff8d2 to your computer and use it in GitHub Desktop.
Save ptitbob/39aaa935a0725ece5706484f36fff8d2 to your computer and use it in GitHub Desktop.
FROM maven:3.5.0-jdk-8 as builder
WORKDIR /usr/src/mymaven
COPY pom.xml /usr/src/mymaven
COPY src /usr/src/mymaven/src
RUN mvn -f /usr/src/mymaven/pom.xml clean package
FROM openjdk:8u131-jre-alpine
WORKDIR /root/
COPY --from=builder /usr/src/mymaven/target/pingserver-0.9.0-docker.jar /root/
CMD java -jar pingserver-0.9.0-docker.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment