jenkins build docker images

8/14/2017

I'm going to use jenkins to build images and then deploy to kubernetes.

I have a problem about building. We have a lot of programs written in c++, java, nodejs, php, golang and etc.

How should I support all kinds of build ?

-- xren
docker
jenkins
kubernetes

1 Answer

8/14/2017

Through the Jenkins Swarm plugin, you can define and use a Jenkins slave with the various language tools pre-installed.

See docker-jenkins-slave, which includes a Dockerfile installing the lanaguages compilators.

You can then start a slave:

docker run -d -v /var/run/docker.sock:/var/run/docker.sock heliostech/jenkins-slave-docker \
  -master http://jenkins-server/ -username JENKINS_USER -password JENKINS_USER_KEY \
  -executors 2 -labels "docker"
-- VonC
Source: StackOverflow