This repository contains a Dockerfile to build a custom container image for a self-hosted GitHub Actions runner. The image is based on the official actions-runner image and includes a variety of common tools and dependencies needed for modern CI/CD workflows.
The primary goal of this custom runner is to provide a pre-configured environment with necessary software, reducing setup time within workflow jobs and ensuring consistent builds.
ghcr.io/actions/actions-runner:latest
This image comes with the following software and tools pre-installed:
- Node.js 18.x: A modern version of Node.js for JavaScript-based tools and applications.
- Python 3: The latest stable version of Python available in the base image's repositories.
- PHP 8.1, 8.2, 8.3, 8.4,8.5: Multiple PHP versions with common extensions pre-installed (mbstring, intl, mysqli, pdo_mysql, gd, xml, zip, curl, bcmath, opcache). PHP 8.5 is set as the default
phpcommand, while all versions are accessible viaphp8.1,php8.2,php8.3,php8.4andphp8.5.
- npm (via Node.js)
- yarn: A popular JavaScript package manager.
- pip3 (via Python 3)
- Composer: PHP dependency manager, installed globally and available system-wide.
- AWS SAM CLI: The AWS Serverless Application Model (SAM) Command Line Interface for building and deploying serverless applications.
- Git & Git LFS: For version control and handling large files.
A comprehensive set of build tools and libraries are included to compile native extensions and other software:
build-essentialautoconf,automake,libtoollibssl-dev,libxml2-dev,zlib1g-dev,libonig-dev,libzip-dev,libcurl4-openssl-dev
- @redocly/cli: For OpenAPI documentation generation and validation.
- yamllint: A linter for YAML files.
- Standard utilities like
curl,wget,unzip,zip,rsync.
-
Build the Docker image:
docker build -t brixion-github-runner . -
Run the container: Follow the GitHub documentation for running self-hosted runners in a container. You will need to provide your repository/organization URL and a personal access token (PAT) to register the runner.