docker-github-runner icon indicating copy to clipboard operation
docker-github-runner copied to clipboard

How to defined RUNNER_LABELS in docker-compose file?

Open xw185019-ncr opened this issue 3 years ago • 2 comments

HI , i have create a docker-compose.yaml and try to run the runner with RUNNER_LABELS environment variable, but it doesn't work as expected. here is my docker-compose.yaml file

version: "3.7"

services:
    runner:
      image: tcardonne/github-runner:latest
      environment:
        RUNNER_NAME: "my-runner"
        RUNNER_REPOSITORY_URL: ${RUNNER_REPOSITORY_URL}
        #RUNNER_ORGANIZATION_URL: ${RUNNER_ORGANIZATION_URL}
        GITHUB_ACCESS_TOKEN: ${GITHUB_ACCESS_TOKEN}
        RUNNER_LABELS: "my-runner"
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock

after i docker-compose up, the runner did run successfully but without "my-runner" label attached.

Can you help me with this?

regards dawnseeker8

xw185019-ncr avatar Jun 02 '21 10:06 xw185019-ncr

What you did should work.

https://github.com/tcardonne/docker-github-runner/blob/21400f71b894946de9b75127ba0353807cde1135/docker/entrypoint.sh#L36

marcofranssen avatar Jun 03 '21 08:06 marcofranssen

Actually after i switch the image from tcardonne/github-runner:latest to tcardonne/github-runner:ubuntu-20.04. then the label start working, but it didnt work for latest tag which use debian for so reason.

xw185019-ncr avatar Jun 03 '21 08:06 xw185019-ncr