Run Jenkins Master and Docker Slave

I want to configure Jenkins master on server A and obey on server B using Docker.

Both servers are virtual machines designed for Jenkins.

Currently, I started a Docker container on server A for the wizard , based on the official Jenkins docker image. But which docker image should I use for the Jenkins slave ?

+4
source share
2 answers

In fact, it depends on the environment and the tools you need in your build environment. For example, if you are creating a C project, you will need an image that contains the C compiler, and possibly makeif you use Makefiles. If you create a Java project, you will need the JDK with the Java compiler, and possibly Ant / Maven / Gradle, if you will use them as part of your build.

You can use evarga / jenkins-slave as a good starting point for your slave device.

This image already contains the JDK. If you just need JDK and Maven on your slave, you can create a Docker image with the following Dockerfile:

FROM evarga/jenkins-slave

run apt-get install maven

Docker slave- . Jenkins Build Environment Docker Containers:

, Docker . , Dockerfile, Dockerfiles , , Dockerfiles .

+4

Source: https://habr.com/ru/post/1655714/


All Articles