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

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

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


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

Step 2:
Go to the java-maven-build job, > Open it > go to configure
Note:

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.
