Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 1.15 KB

File metadata and controls

57 lines (33 loc) · 1.15 KB

Deploy-JAVA-app-on-Docker-Container

Overview:

This is a simple Java project that prints the system date on the screen. We will run this project through Docker.

Implementation Steps:

Step 1

git clone https://github.com/muhammadaliazhar/JavaApp-docker.git

Step 2

docker build -t java-app .
image

Step 3

`docker run java-app:latest`
image

Step 4 --- Change the source code and create an update docker image

Whenever we do changes in our application code then we need to update docker image as well

cd src
vim Main.java

Step 5 Build & Tag Docker image again to create updated image

docker build -t java-app:v1 .

Step 6 Run container using updated docker image

docker run java-app:v1
image