Awadhesh
Oct 18, 2022

How to Containerised your Java Application Application

Step 1. Add Docker file in root directory of your Project.

docker file contain below command.

from openjdk

WORKDIR /app

COPY target/test.jar /app/

Step 2. Build your project through Jenkins job

mvn clean install

this will create jar file.

Step 3. Build Docker Image using below command(using jenkins)

docker build .

Step 4. Upload Docker image to docker hub private repository

======================

We can Deploy this docker Image using Kubernetes

.