Lets create an EC2 Instance
Now install Docker and start the docker service
Install git and clone the repository url to the docker server:
Installing java 17 for our java web application:
Now Install Maven build tool.
Here it will takes our project's Java source code, compiles it, tests it and converts it into an executable Java program
Build's the docker image for java web application and tag it as kishorech48/java-web-app:latest, in the current directory (.).
Run the container:
It uploads (pushes) your locally built Docker image (kishorech48/java-web-app:latest) to a Docker registry, typically Docker Hub
Attach security group to access the application by using custom tcp, port 7070 as shown in below.
Java web application might be deployed under /java-web-app instead of /.



















