Docker Pipeline plugin communicate with non-default docker server

0 votes
By default, the docker pipeline plugin communicates with the local docker daemon. How do i make it communicate with a non-default docker server, something like Docker Swarm?
Apr 12, 2019 in Jenkins by Kim
1,299 views

1 answer to this question.

0 votes

Hi @Kim, yes you can. You can use the withServer() function for this. Use it in a similar manner

node {
    checkout scm


    docker.withServer('tcp://swarm.example.com:2376', 'swarm-certs') {
        docker.image('mysql:5').withRun('-p 3306:3306') {
            /* do things */
        }
    }
}
answered Apr 12, 2019 by Shruti

Related Questions In Jenkins

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
4,653 views
0 votes
1 answer

Use Custom Docker registry with jenkins declarative pipeline

Yes, you can! try something like this: node ...READ MORE

answered Apr 12, 2019 in Jenkins by Bishu
2,127 views
0 votes
1 answer

How to deploy the war file in Tomcat Server with Jenkins pipeline job on an windows machine?

Use deploy to container plugin. Go to the ...READ MORE

answered Sep 30, 2020 in Jenkins by Adil Abdullah Khan
4,358 views
0 votes
1 answer

Jenkins: Build Pipeline Plugin Scheduled Trigger

This can be done by setting the ...READ MORE

answered Jul 11, 2018 in Jenkins by Sophie may
• 10,610 points
4,393 views
+2 votes
1 answer
+2 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
• 58,090 points
2,435 views
0 votes
5 answers
0 votes
2 answers
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