I want to run Gitlab CI Runner in a docker container while also using the docker executor to run my builds in their own docker containers, all of that on top of CoreOS.

Is this even possible? Every documentation I've found so far assumes that Gitlab Runner is running on the host OS which is not a viable option for me.

The alternative would be to have specialised gitlab-runner containers with the build dependencies installed in each one.


There is --privileged parameter


Which should give capability to run docker inside docker. So theoretically it possible, but you probably run into other problems.

| improve this answer | |

You need to mount docker.sock , set --privileged

docker run -d  -v /var/run/docker.sock:/var/run/docker.sock --name gitlab-runner --privileged --restart always -v d:/docker/data/gitlab-runner:/etc/gitlab-runner gitlab/gitlab-runner:latest

And set config privileged .


  name = "docker2"
  url = "https://gitlab.com/"
  token = "xxxxx"
  executor = "docker"
    image = "alpine:latest"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    shm_size = 0
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.