-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added multistage Dockerfile for gameoflife
- Loading branch information
1 parent
a72cf4c
commit 178f79a
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |