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
2,130 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
5,851 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
3,399 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
5,550 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,620 points
5,706 views
+2 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
7,878 views
0 votes
4 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