Skip to content

Instantly share code, notes, and snippets.

@kadel
Last active March 4, 2020 16:34
Show Gist options
  • Save kadel/7728791e2388e5d18098fdc11475fea9 to your computer and use it in GitHub Desktop.
Save kadel/7728791e2388e5d18098fdc11475fea9 to your computer and use it in GitHub Desktop.
Dockerfile for github.com/kadel/demo-backend
FROM maven:3.6.3-jdk-11-openj9
WORKDIR /src
# to benefit from docker build cache
COPY pom.xml /src/pom.xml
RUN mvn dependency:go-offline
COPY . /src
RUN mvn package -DskipTests
CMD ["sh", "-c" ,"java -jar target/*.jar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment