Skip to content

add support for DOCKER_PRVILEGED flag on register#19

Closed
djskinner wants to merge 1 commit into
sameersbn:masterfrom
djskinner:docker-priviledged
Closed

add support for DOCKER_PRVILEGED flag on register#19
djskinner wants to merge 1 commit into
sameersbn:masterfrom
djskinner:docker-priviledged

Conversation

@djskinner

Copy link
Copy Markdown

To allow CI runners that using docker in docker mode: http://docs.gitlab.com/ce/ci/docker/using_docker_build.html

@sameersbn

Copy link
Copy Markdown
Owner

should we be checking if RUNNER_EXECUTOR is docker before adding the flag?

@djskinner

Copy link
Copy Markdown
Author

Yes it makes sense. My bash skills are pretty poor but I'll have a bash at it nonetheless.

@djskinner

Copy link
Copy Markdown
Author

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.

@djskinner djskinner changed the title add support for DOCKER_PRVILEDGED flag on register add support for DOCKER_PRVILEGED flag on register May 25, 2016
@djskinner

djskinner commented May 25, 2016

Copy link
Copy Markdown
Author

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?

@Firef0x

Firef0x commented May 31, 2016

Copy link
Copy Markdown

@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 ! 🙇

@oomathias

Copy link
Copy Markdown

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 :)

@djskinner

Copy link
Copy Markdown
Author

Closing in favour of #29

@djskinner djskinner closed this Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants