Step 1: Create a Docker Hub Account, and Create a Repository.

Screenshot 2026-08-01 005656.png

Step 2: Configure Credentials in Jenkins. Go to Settings, > Manage Jenkins > Credentials

Screenshot 2026-08-01 005928.png

Step 3: Click create credentials, select (Username and password) > Then enter dockerhub username and password, then save.

Screenshot 2026-08-01 010307.png

Screenshot 2026-08-01 010438.png

Next Step is to Push Built Image to Docker Hub Repository.

Step 1:

Copy the repository name alongside my docker hub name and tag it to the image

Screenshot 2026-08-01 011229.png

Step 2:

Go to the java-maven-build job, > Open it > go to configure

Note:

  1. To push images to docker hub, we tag the image with the name of the repository.
  2. The information below is still incomplete as I have to Specify username and password as options.

Screenshot 2026-08-01 011920.png

Step 3: To get Username and password, we scroll up to Environment, Select secret text or file, select add, > Then select Username and password separated.

Screenshot 2026-08-01 012304.png