0

I am trying to build docker Image using jenkins x and I have created kubernetes cluster using minikube. got an error /var/jenkins_home/workspace/sarika-ps_go-k8s_master@tmp/durable-6564436e/script.sh: docker: not found. I have installed the docker plugin on jenkins x. Please help me. Thanks

1 Answer 1

1

what kind of project are you trying to build? If you try to import your code you'll hopefully find your project gets setup correctly.

basically Jenkins X uses build pods to run the pipelines which already have all the software tools required for pipelines (docker, skaffold, kubectl etc) inside the build pod which is defined as a docker image.

Try to reuse one of the existing build pods - e.g. using jenkins-maven as the build agent:

 pipeline {
  agent {
    label "jenkins-maven"
  }
  stages {
    stage('release') {
      steps {
        container('maven') {
          sh "docker build -t foo:bar ."
...

or you could try create a custom build pod.

1
  • I am trying to build a simple Docker image but its showing docker not found while executing build command Jan 22, 2019 at 12:45

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.