diff --git a/Dockerfile b/Dockerfile index 0966445..9050f8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,17 @@ +#Stage 1: Checkout source code +FROM alpine/git as checkout +WORKDIR /app +RUN git clone https://github.com/artisantek/java-example.git + +# Stage 2: Build the Java application FROM maven:amazoncorretto as build -WORKDIR /javaapp -COPY . . +WORKDIR /app +COPY . . RUN mvn clean install +# Stage 3: Deploy the application to Tomcat FROM adhig93/tomcat-conf -COPY --from=build /javaapp/target/*.war /usr/local/tomcat/webapps/ +COPY --from=build /app/target/*.war /usr/local/tomcat/webapps/ + + + diff --git a/sunil sd dummy file b/sunil sd dummy file new file mode 100644 index 0000000..4759f86 --- /dev/null +++ b/sunil sd dummy file @@ -0,0 +1,2 @@ +llkkecho hi +ki