diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..af2515bc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +#apt install openjdk-17-jdk -y +#apt install maven -y +FROM maven:3.8.3-openjdk-17 AS builder +WORKDIR /app +COPY . . +RUN mvn clean package +#stage:2 +FROM tomcat:9.0-jdk17-temurin AS runtime +RUN rm -rf /usr/local/tomcat/webapps/* +COPY --from=builder /app/target/*.war /usr/local/tomcat/webapps/ROOT.war +EXPOSE 8080 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..47de1a5c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.9" +services: + netflix-app: + build: + context: . + container_name: netflixapp + networks: + - netflixapp-nw + ports: + - "8080:8080" + restart: always + + +networks: + netflixapp-nw: + diff --git a/pom.xml b/pom.xml index 01e0d5a2..a64d79a3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,51 +1,71 @@ - 4.0.0 - in.RAHAM - NETFLIX - war - 1.2.2 - Java Home myweb - http://maven.apache.org - - - kammana - - - - com.oracle.bedrock - bedrock-runtime-maven - 5.1.2 - - - - junit - junit - 3.8.1 - test - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + in.RAHAM + NETFLIX + war + 1.2.2 + Java Home myweb + http://maven.apache.org - - - - - nexusRepo - http://13.233.230.166:8081/repository/maven-snapshots/ - - - - nexusRepo - http://13.233.230.166:8081/repository/maven-releases/ - - - - - - maven1 - Maven.org - http://repo1.maven.org/maven2 - - + + kammana + 17 + + + + + com.oracle.bedrock + bedrock-runtime-maven + 5.1.2 + + + + junit + junit + 3.8.1 + test + + + + + + nexusRepo + http://13.233.230.166:8081/repository/maven-snapshots/ + + + nexusRepo + http://13.233.230.166:8081/repository/maven-releases/ + + + + + + maven1 + Maven.org + http://repo1.maven.org/maven2 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + + -