I set up an gitlab-ci-multi-runner on my VM.
In the build process I provide an docker container with all the dependencies.
But when I run it, the runner uses a different (wrong) docker image for his build container.
The messages look like that:
Running with gitlab-ci-multi-runner 9.2.1 (f0xxxx4)
on runnerVM (f5xxxxf0)
Using Docker executor with image docker.com/xxx/xxx/docker-build:stable ...
Using docker image sha256:fe32xxx...xxxa63c for predefined container...
Pulling docker image docker.com/xxx/xxx/docker-build:stable ...
Using docker image docker.com/xxx/xxx/docker-build:stable ID=sha256:9608xxx...xxxdf09 for build container...
Can someone tell me why the runner uses a different docker image for build container?
Why is it not taking the predefined container (because that's the right one...)
Here you can see my gitlab-ci.yml:
image: docker.com/xxx/xxx/docker-build:stable
before_script:
- echo "Before script"
after_script:
- echo "After Script"
stages:
- build
- test
- deploy
build_release:
stage: build
script:
- sudo make all BUILD_TYPE=Release
only:
- master
tags:
- tag1
build_debug:
stage: build
script:
- sudo make all BUILD_TYPE=Debug
only:
- develop
- runner-test
tags:
- tag1
- tag2
In your
.gitlab-ci.ymlyou are referencing the complete URL to your container; it should however be in the formatgroup/container, e.g.library/nginx.Optionally, you may use a specific version, e.g.
library/nginx:1.13.9.For more information, see: https://docs.gitlab.com/ce/ci/docker/using_docker_images.html