Giter Club home page Giter Club logo

docker-github-runner's Introduction

Github Runner on Docker

Self hosted runner on docker container

Usage

You don't need to change docker-compose.yml file. Just copy and use the file from repository. However, you need to create a .env file.

Please check .env.example file.

When the 2 files are ready, run below command

docker-compose up -d

OR

docker compose up -d

docker-compose.yml

version: "3"

services:
  github-runner:
    # Docker Hub Registry
    # image: mainto/github-runner:latest

    # Github Container Registry
    image: ghcr.io/mainto/docker-github-runner:latest
    privileged: true
    volumes:
      - github-runner-volume:/runner
    environment:
      - GIT_URL=${GIT_URL}
      - TOKEN=${TOKEN}
    restart: unless-stopped
volumes:
  github-runner-volume: 

.env

# Project name must be unique on your docker host (for volume)
COMPOSE_PROJECT_NAME=github-runner

# Github Repository - ex) https://github.com/{USER}/{REPO}
GIT_URL=https://github.com/mainto/docker-github-runner

# You can get a token here: 
# https://github.com/{USER}/{REPO}/settings/actions/runners/new
TOKEN=ABCDEF012345678900SAMPLETOKEN

Environments

All 3 environment values are required

COMPOSE_PROJECT_NAME
This is project name. It must be unique on your docker host. It will prevent to use same volume.
GIT_URL
This is your Github Repository URL
ex) https://github.com/mainto/docker-github-runner
TOKEN
You can get a token here: https://github.com/{USER}/{REPO}/settings/actions/runners/new
  • TOKEN will be expired after few minutes.
  • After runner is registered as github runner, you don't need to get new TOKEN. Credentials will be stored on docker volume.
  • When restart this docker container, stored credentials will be reused.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.