Docker image requirements for GitLab-CI Runner

I have GitLab, GitLab-CI and gitlab-ci-multi-runner

running on different machines. I have successfully added a runner using docker and ruby: 2.1 image as described at https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md

What I would like to do next is runners for the minimum configured Ubuntu 12.04, 14.04. Not knowing docker, I thought I'd try using images ubuntu:14.04

and ubuntu:12.04

. However, when you run and try to clone my project repo, they complain about git

not being found. Then I assumed that with these images, git was not installed. So my questions are:

  • What tools should be available in the docker image to be used out of the box with gitlab-ci-multi-runner

  • Is there a set of images already available for different OS with already included
  • Should I really be looking for creating my own docker images for this purpose?
+3


source to share


1 answer


Popular base images containing commonly used software building software are based on buildpack-deps

https://hub.docker.com/r/library/buildpack-deps/ ( openjdk builds on this for example )

In your case, you can specify FROM buildpack-deps:stretch-scm

which is Debian Stretch based and includes Source Code Management (SCM) tools like git.



I suppose you could create a Gitlab Runner that uses these default images. But I think you should always specify the required image in the .gitlab-ci.yml

-file
.

I would always hesitate to create my own Docker images because there is a lot available . However, many specific ones are supported (or better not supported) by one person for a specific use case that is often inappropriate for your application. A better choice would be to choose a base image and add only minor commands RUN

to adjust.

0


source







All Articles