Hello,
thank you for the reply. I did try, however there are a few reasons why
that didn't work for me:
* the jnlp-agent-docker, being based on openjdk at its root, doesn't
have several build tools more readily available on other images
* the agent specifically has the jnlp-slave built-in which eases
communication, most images would require `docker attach`
* the official jenkins/jenkins image doesn't seem to be natively able to
run docker containers, for example the following pipeline:
pipeline {
agent {
docker {
image "golang:1.12-alpine"
}
}
stages {
stage('Build') {
steps {
git '<myrepo'
sh "go get ./..."
sh "go build ."
}
}
}
}
fails when it tries to execute the `docker login` command as it's not
present.
This forced me to use the jnlp-agent which *does* have the docker
command and mounts the /run/docker.sock from the host (or connects via TLS)
* such a workaround however does not support launching a second
container and would require a different, customized image for every
pipeline as a "Docker Agent template" configured in Jenkins, which is
very cumbersome
It is very possible I'm missing something or misconfigured my Jenkins
master but this is what I'm experiencing.
Regards,
Daniele
On 18/03/19 08:43, nicolas de loof wrote:
> Hi.
>
> Why do you use some "jnlp-agent-docker" agent as you then switch to
> another one, based on a docker image ? Why not just use the later for
> the whole build ?
>
> Le lun. 18 mars 2019 à 07:20, Daniele Riccucci <
dev...@posteo.net
> <mailto:
dev...@posteo.net>> a écrit :
> <mailto:
jenkinsci-users%2Bunsu...@googlegroups.com>.
> --
> 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-use...@googlegroups.com
> <mailto:
jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmAcGFLmMmHd_TOpYHgZ%2Bw4fz%2BinQS3wEfeSrG-fNGDsg%40mail.gmail.com
> <
https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmAcGFLmMmHd_TOpYHgZ%2Bw4fz%2BinQS3wEfeSrG-fNGDsg%40mail.gmail.com?utm_medium=email&utm_source=footer>.