Skip to content

Instantly share code, notes, and snippets.

@veteran29
Created July 2, 2018 13:32
Show Gist options
  • Save veteran29/9a48694a90092be6675187ad0315db1c to your computer and use it in GitHub Desktop.
Save veteran29/9a48694a90092be6675187ad0315db1c to your computer and use it in GitHub Desktop.
Docker - Gitlab Runner - Docker Compose - DIND
# Gitlab Runner DIND
version: '3.2'
services:
dind:
restart: always
privileged: true
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
expose:
- 2375
- 2376
runner:
restart: always
image: gitlab/gitlab-runner:alpine
volumes:
- ./config:/etc/gitlab-runner:Z
environment:
- DOCKER_HOST=tcp://dind:2375
register-runner:
restart: 'no'
image: gitlab/gitlab-runner:alpine
volumes:
- ./config:/etc/gitlab-runner:Z
command:
- register
- --non-interactive
- --locked=false
- --name=Gitlab DIND Runner
- --executor=docker
- --docker-image=docker:17.09.0-ce-dind
- --docker-volumes=/var/run/docker.sock:/var/run/docker.sock
environment:
- CI_SERVER_URL=https://gitlab.com/
- REGISTRATION_TOKEN=<YOUR TOKEN HERE>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment