File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM ubuntu
2- RUN apt-get update && \
3- apt-get install -y \
4- openjdk-11-jdk
1+ FROM alpine:latest AS checkout
2+ RUN apk add git
3+ RUN git clone https://github.com/Devops-Sept-Batch-2024/java-example.git
4+ WORKDIR /java-example
55
6- RUN git clone https://github.com/BinduPrivate/java-example.git /app
6+ FROM maven:3.8.6-amazoncorretto-11 AS build
77WORKDIR /app
8+ COPY --from=checkout /java-example/pom.xml ./
89RUN mvn clean package
9- ADD https://downloads.apache.org/tomcat/tomcat-9/v9.0.98/bin/apache-tomcat-9.0.98.tar.gz /opt/
10- RUN mv /opt/apache-tomcat-9.0.98 /opt/tomcat
11- COPY /app/target/works-with-heroku-1.0.war /opt/tomcat/webapps/ROOT.war
12- EXPOSE 8080
13- CMD ["/opt/tomcat/bin/catalina.sh" , "run" ]
14-
15-
16-
1710
11+ FROM artisantek/tomcat:1
12+ COPY --from=build /app/target/*.war /usr/local/tomcat/webapps/
13+ EXPOSE 8080
14+ CMD ["catalina.sh" ,"run" ]
1815
You can’t perform that action at this time.
0 commit comments