Declarative pipeline docker executeable TCP supported?

25 views
Skip to first unread message

Peter Teichner

unread,
Sep 1, 2017, 6:40:32 PM9/1/17
to Jenkins Users
I've got a quick question: when using declarative pipeline with the agent specified as a docker image how does the pipeline determine where the docker executable is? Is there a way to set a remote docker over TCP?

agent {
    docker {
        image 'maven:3-alpine'
        label 'my-defined-label'
        args  '-v /tmp:/tmp'
    }
}

I use CoreOS for all the Docker related stuff and I haven't got Docker running on the Jenkins master.
Message has been deleted

Reza Etezal

unread,
Sep 1, 2017, 7:00:25 PM9/1/17
to Jenkins Users
You need to either set it in the Global Tool Confoguration, at the system level https://<jenkins URL>/configureTools/, or in the Tool Location at the node level https://<jenkins URL>/computer/<node name>/configure

Peter Teichner

unread,
Sep 2, 2017, 10:50:34 PM9/2/17
to Jenkins Users
That doesn't really work as I haven't got docker or have no intention of running docker on the node of the jenkins master. So is there a way to use a remote docker machine or no?

nicolas de loof

unread,
Sep 2, 2017, 10:56:42 PM9/2/17
to jenkins...@googlegroups.com
docker agent in declarative pipeline actually translate into docker.inside (see docker-pipeline-plugin for details) which require running docker containers on the same node as the build (so it can access workspace)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/346beadc-4834-49ba-a6f1-0c91e482e13c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages