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
432 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
958 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
• 45,510 points
349 views
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,490 points
325 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
1,385 views