Skip to content

joshika39/docker-runners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Containerized Github Runner

This repository contains a Dockerfile to build a container image for a self-hosted Github runner. The runner is based on the official Github runner image and adds some additional tools and configurations.

Usage

When building the image

Required environment variables:

  • GH_PROFILE: The Github profile to register the runner with.
  • AUTHOR: The author of the image.
  • EMAIL: The email of the author.
  • RUNNER_VERSION: The version of the runner
docker build \
  --build-arg GH_PROFILE=<GH_PROFILE> \
  --build-arg AUTHOR=<AUTHOR> \
  --build-arg EMAIL=<EMAIL> \
  --build-arg RUNNER_VERSION=<RUNNER_VERSION> \
  -t gh-runner:<RUNNER_VERSION> .

When running the container

You need to Check the repo and admin:org permissions when creating the token.

When running the container with docker

docker run -d \
  --name gh-runner \
  -e GH_OWNER=<GH_OWNER> \
  -e GH_REPOSITORY=<GH_REPOSITORY> \
  -e GH_TOKEN=<GH_TOKEN> \
  gh-runner:<RUNNER_VERSION> -d

Required environment variables:

  • GH_OWNER: The owner of the repository.
  • GH_REPOSITORY: The repository to register the runner with.
  • GH_TOKEN: The token to authenticate the runner with.

When running the container with docker-compose

name: gh-runner

services:
  gh-runner:
    image: gh-runner:<RUNNER_VERSION>
    container_name: gh-runner
    restart: unless-stopped
    environment:
      - GH_OWNER=<GH_OWNER>
      - GH_REPOSITORY=<GH_REPOSITORY
      - GH_TOKEN=<GH_TOKEN>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published