Skip to content

Commit

Permalink
Added multistage Dockerfile for gameoflife
Browse files Browse the repository at this point in the history
  • Loading branch information
qtkhajacloud committed Jun 14, 2022
1 parent a72cf4c commit 178f79a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion jun22/gol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Multistage build in Docker
# building the application
FROM maven:3-openjdk-8 AS builder
RUN git clone https://github.com/wakaleo/game-of-life.git && cd game-of-life && mvn package


# application image
FROM tomcat:9
LABEL author="khaja"
ADD https://referenceapplicationskhaja.s3.us-west-2.amazonaws.com/gameoflife.war /usr/local/tomcat/webapps/gameoflife.war
COPY --from=builder /game-of-life/gameoflife-web/target/gameoflife.war /usr/local/tomcat/webapps/gameoflife.war
EXPOSE 8080

0 comments on commit 178f79a

Please sign in to comment.