Closed djskinner closed 8 years ago
should we be checking if RUNNER_EXECUTOR
is docker
before adding the flag?
Yes it makes sense. My bash skills are pretty poor but I'll have a bash at it nonetheless.
I'm not sure exactly what you mean @Firef0x. Can you elaborate? I'm have been following the 'use docker-in-docker executor` instructions here: http://docs.gitlab.com/ce/ci/docker/using_docker_build.html to get it working.
As a quick update I'm still trying to work my way through the best approach. The container registry announcement probably throws in some more things to consider.
I'm now wondering if privileged / DIND is required at all for my needs.
See here:
https://gitlab.com/gitlab-org/gitlab-ce/issues/17769
@Firef0x I think I have a better understanding of what you meant now, would I be right in thinking I could also bind-mount the docker socket in the same was you suggested for --privileged
?
I guess I'm just confused why the docker-privileged
and --docker-volumes
commands are required on the register command. Are both actually required?
@djskinner Sorry that I used a different way here to run Docker in the Runner. (replace the base image with gitlab/dind
) It seems to be a good way to simply set --executor=docker
but I also want to run Node.js test in the same Runner. I'll consider merging your request in my own repo. Thx a lot ! :bow:
In case someone is interested I did this https://github.com/oomathias/docker-gitlab-ci-multi-runner/tree/1.5.3
It's based on alpine, I do not use dind but /var/run/docker.sock:/var/run/docker.sock:ro
Added support to --env with ENV_VARS
, since I need to pass environment variables to my docker.
You can try the build with docker pull quay.io/oomathias/docker-gitlab-ci-multi-runner:1.5.3
.
Please do not use that in prod, I'm not sure to maintain it. So for now you should do your own image. Also, image is only 70Mb :)
Closing in favour of #29
To allow CI runners that using docker in docker mode: http://docs.gitlab.com/ce/ci/docker/using_docker_build.html