Skip to content

chellurikishorekumar/java-web-app-docker

 
 

Repository files navigation

Lets create an EC2 Instance

AWS instance creation1

AWS instance created

AWS Page

AWS instance Launch

Now install Docker and start the docker service

ssh to D_S

Install git and clone the repository url to the docker server:

install git

git clone repo

goto to repository

Installing java 17 for our java web application:

install java

Now Install Maven build tool.

maven installation

maven installation-1

Here it will takes our project's Java source code, compiles it, tests it and converts it into an executable Java program

mvn clean package

Build success

Build's the docker image for java web application and tag it as kishorech48/java-web-app:latest, in the current directory (.).

docker image build

Run the container:

docker container was created

It uploads (pushes) your locally built Docker image (kishorech48/java-web-app:latest) to a Docker registry, typically Docker Hub

docker hub

docker cont image pushed to docker hub

Attach security group to access the application by using custom tcp, port 7070 as shown in below.

security group

application was not accessible due to permission issue

Java web application might be deployed under /java-web-app instead of /.

application was accessible and running

About

Deploying Java web application on docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 66.7%
  • Smarty 31.7%
  • Dockerfile 1.6%