1

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

  1. Push artifactory .war to nexus

  2. Pull another git repo having dockerfile and other supporting data

  3. take artifactory (war) from nexus and add it to docker images build.

  4. Push the newly updated image to docker repo

  5. 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.

2 Answers 2

1

On building the docker image, you need to have the docker daemon enabled. You can also use the jib, a Google project, which creates images for your Java applications without the Docker daemon

0

https://github.com/GoogleContainerTools/kaniko could be used. I have seen it in action, but now implement it myself yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.