Skip to content

Gitlab runner failing to run dind

We're having an issue trying to get a gitlab runner to build docker images. We have other runners that are working perfectly fine, but one of them keeps giving this error:

ERROR: Preparation failed: Error response from daemon: privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode (executor_docker.go:517:0s)


config.toml (docker section)
 [runners.docker]
    tls_verify = false
    image = "alpine"
    privileged = true
    userns_mode = "host"
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0

What could I be missing or is this an issue? We have other runners that are doing dind no problem, they are however running Docker 18.

Docker version on the runner is: Docker version 19.03.4, build 9013bf583a

Gitlab runner version: 12.3

Edited by Ghost User