6

How can one set the Pipeline so that Docker will pull images from a local registry?

15

Found on a user mailing list post but I did not see this in the official docs.

For posterity sake here is the answer from the link

agent {
  docker {
    image "image name"
    registryUrl "https://wherever"
    registryCredentialsId "credsId"
  }
}

I tested this works with the most up to date plugin at time of writing.

|improve this answer|||||
  • 1
    That seems right, also seen in JENKINS-39684. Sorry for being too fast and arrogant with my other answer (which I've deleted now). – StephenKing May 26 '17 at 18:13
  • 1
    No worries. Sorting out links/docs etc between the declarative and previous version is difficult. – bearrito May 26 '17 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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