I am trying to integrate docker build process in Jenkins. I know the things with docker plugin and configure docker agent and template to build it. I want these things to be done with Jenkins pipeline code.
Basically, I want below process
1. Pull the sources code from git and create maven build
Push artifactory .war to nexus
Pull another git repo having dockerfile and other supporting data
take artifactory (war) from nexus and add it to docker images build.
Push the newly updated image to docker repo
execute deployment on kubernetes.
I have steps to build maven code push it to nexus and deployemnt on k8s. But I am facing issue to build docker image using. I have jenkin setup using docker image. So need to use docker agent and related plugin in jenkin code.