Skip to content
 
 

Latest commit

 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github self-hosted runner Dockerfile

This repository contains a Dockerfile that builds a Docker image suitable for running a self-hosted GitHub runner.

You can build this image yourself, or use the Docker image from the Docker Hub.

Building the container

docker build -t github-runner .

Features

  • Repository runners
  • Organizational runners
  • Labels
  • Graceful shutdown
  • Support for installing additional debian packages
  • Auto-update after the release of a new version

Examples

Register a runner to a repository.

docker run --name github-runner \
     -e GITHUB_OWNER=username-or-organization \
     -e GITHUB_REPOSITORY=my-repository \
     -e GITHUB_PAT=[PAT] \
     github-runner

Register a runner with github token.

docker run --name github-runner \
     -e GITHUB_OWNER=username-or-organization \
     -e GITHUB_REPOSITORY=my-repository \
     -e GITHUB_TOKEN=[github.token] \
     github-runner

Create an organization-wide runner.

docker run --name github-runner \
    -e GITHUB_OWNER=username-or-organization \
    -e GITHUB_PAT=[PAT] \
    github-runner

Set labels on the runner.

docker run --name github-runner \
    -e GITHUB_OWNER=username-or-organization \
    -e GITHUB_REPOSITORY=my-repository \
    -e GITHUB_PAT=[PAT] \
    -e RUNNER_LABELS=comma,separated,labels \
    github-runner

Install additional tools on the runner.

docker run --name github-runner \
    -e GITHUB_OWNER=username-or-organization \
    -e GITHUB_REPOSITORY=my-repository \
    -e GITHUB_PAT=[PAT] \
    -e ADDITIONAL_PACKAGES=firefox-esr,chromium \
    github-runner

About

Self hosted github runner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages