Use Custom Docker registry with jenkins declarative pipeline

0 votes
Is it possible to use custom docker registry instead of the default one with Jenkins declarative pipeline? If yes, How? Thank you!
Apr 12, 2019 in Jenkins by Phoenix
• 3,830 views

1 answer to this question.

0 votes

Yes, you can! try something like this:

node {
    checkout scm

    docker.withRegistry('https://registry.example.com') {

        docker.image('my-custom-image').inside {
            sh 'make test'
        }
    }
}
answered Apr 12, 2019 by Bishu
That's not the declarative pipeline.

Related Questions In Jenkins

0 votes
1 answer

Can I use multiple containers on a jenkins declarative pipeline?

Yes of course you can!! You try ...READ MORE

answered Apr 12, 2019 in Jenkins by Vedant
• 7,212 views
0 votes
2 answers
0 votes
1 answer

Jenkins and Docker: How can I customize my jenkins pipeline to use docker?

Jenkins Pipeline is designed to easily use ...READ MORE

answered Aug 26, 2019 in Jenkins by Sirajul
• 59,190 points
• 2,980 views
0 votes
1 answer

What is the use of using declarative pipeline (i.e jenkins file) over scripted pipeline in real time

Hi@Shashi, The declarative pipeline is a relatively new ...READ MORE

answered Oct 28, 2020 in Jenkins by MD
• 95,460 points
• 3,008 views
+2 votes
1 answer
0 votes
1 answer

Program to execute Dockerfile using Jenkins declarative pipeline

Hey @Nishant, you can use something like ...READ MORE

answered Apr 15, 2019 in Jenkins by Kalgi
• 52,340 points
• 4,550 views
0 votes
1 answer

Use a docker image with jenkins declarative pipeline

Hey @Jithin, you could use something like ...READ MORE

answered Apr 12, 2019 in Jenkins by Bishu
• 6,219 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP