Skip to content

Instantly share code, notes, and snippets.

@chanakaudaya
Created December 19, 2020 03:25
Show Gist options
  • Save chanakaudaya/d0e77d8dea469c03e02882dc4363d8e4 to your computer and use it in GitHub Desktop.
Save chanakaudaya/d0e77d8dea469c03e02882dc4363d8e4 to your computer and use it in GitHub Desktop.
Dockerfile with multi-stage builds for tomcat/maven
FROM maven AS build
WORKDIR /app
COPY . .
RUN mvn package
FROM tomcat
COPY --from=build /app/target/file.war /usr/local/tomcat/webapps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment