Skip to content

Commit de737c2

Browse files
authored
Merge pull request #20 from pirate/patch-2
Add docker-compose example setup
2 parents 9476571 + d3302f8 commit de737c2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,33 @@ github-runner your-account/your-repo AARGHTHISISYOURGHACTIONSTOKEN
7272
github-runner your-account/some-other-repo ARGHANOTHERGITHUBACTIONSTOKEN ubuntu-xenial
7373
```
7474

75+
Or `docker-compose.yml`:
76+
```yml
77+
version: '2.3'
78+
79+
services:
80+
worker:
81+
build: .
82+
image: myoung34/github-runner:latest
83+
environment:
84+
REPO_URL: https://github.com/example/repo
85+
RUNNER_NAME: example-name
86+
RUNNER_TOKEN: someGithubTokenHere
87+
RUNNER_WORKDIR: /tmp/runner/work
88+
ORG_RUNNER: true
89+
ORG_NAME: example-github-org
90+
LABELS: linux,x64,gpu
91+
security_opt:
92+
# needed on SELinux systems to allow docker container to manage other docker containers
93+
- label:disable
94+
volumes:
95+
- '/var/run/docker.sock:/var/run/docker.sock'
96+
- '/tmp/runner:/tmp/runner'
97+
# note: a quirk of docker-in-docker is that this path
98+
# needs to be the same path on host and inside the container,
99+
# docker mgmt cmds run outside of docker but expect the paths from within
100+
```
101+
75102
### Nomad ###
76103

77104
```

0 commit comments

Comments
 (0)