Runners: How do I install and run software from an external repos?

Hi, I’m pretty new to’s CI (and to docker, and to many things.)

I have a simple python pelican static blog that builds with a simple .gitlab-ci.yml

image: python:2.7-alpine

  - pip install -r requirements.txt
  - pelican -s
    - public

So I see that it specifies a python docker image, uses pip to install various python scripts, then runs pelican all within that image.

Now my issue is that I want to run a my own version of pelican. I modified my requirements.txt file to look for my own branch of pelican, but this fails


Now when it builds, Gitlab’s Runner tells me:

Running with gitlab-ci-multi-runner 1.9.0 (82714ae)
Using Docker executor with image python:2.7-alpine ...
Pulling docker image python:2.7-alpine ...
Running on runner-e11ae361-project-1654117-concurrent-0 via runner-e11ae361-machine-1484613050-ce975c76-digital-ocean-4gb...
Cloning repository...
Cloning into '/builds/jerrya/ashercodes'...
Checking out 532f8b38 as master...
$ pip install -r requirements.txt
Collecting git+ (from -r requirements.txt (line 5))
  Cloning (to hidden-cats) to /tmp/pip-72xxqt-build
  Error [Errno 2] No such file or directory while executing command git clone -q /tmp/pip-72xxqt-build
Cannot find command 'git'
ERROR: Build failed: exit code 1

So git doesn’t seem to be present. Indeed prior to the above attempt, I had added a line (that failed) to the .gitlab-ci.yml script saying to use git to clone that repo locally, and that also failed, because … no git.

The docker image I am using python:2.7-alpine also seems to have no apt-get.

Do I need to build my own docker image containing git and python and anything else that I require, or is there some “usual” way to have a runner pull in an external program from either a git repo, or some typical linux package repository? And if I can’t do this, is that in this case the fault of the runner, or the fault of the docker image?

Hi @JerryA,

Thanks for using GitLab and our CI.

You’re correct in your assumption. If you’re using that specific image, and it doesn’t have the tools you require, not a package management toolset, you need to either:

  1. Use a different image
  2. Build your own