I have containerized your web-app
You can add dockerfile to your repo :
Dockerfile
FROM maven:3.9.12-eclipse-temurin-17 AS build
WORKDIR /app
COPY . .
RUN mvn clean package -DskipTests
RUN ls -a
FROM tomcat:10.1-jdk17
COPY --from=build /app/target/java-hello-world.war /usr/local/tomcat/webapps/
EXPOSE 8080
CMD ["catalina.sh","run"]
How to run
docker build -t my-webapp .
docker run -d -p 8080:8080 my-webapp
Access it on localhost
http://localhost:8080/java-hello-world/
ThankYou
I have containerized your web-app
You can add dockerfile to your repo :
Dockerfile
How to run
Access it on localhost
ThankYou