|
1 | | -# github-actions-runner-images |
| 1 | +# GitHub Actions Runner Images |
| 2 | + |
| 3 | +[](https://hub.docker.com/r/emberstack/github-actions-runner) |
| 4 | +[](https://github.com/emberstack/github-actions-runner/pkgs/container/github-actions-runner) |
| 5 | +[](LICENSE) |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +This repository provides enhanced Docker images for GitHub Actions self-hosted runners with a comprehensive suite of pre-installed development and operations tools. Built on top of the official GitHub Actions runner base image, it includes essential tools for CI/CD workflows, making it ideal for enterprise and development environments. |
| 10 | + |
| 11 | +### Key Features |
| 12 | +- 🚀 Based on official GitHub Actions runner image (`ghcr.io/actions/actions-runner:2.327.1`) |
| 13 | +- 🏗️ Multi-architecture support (AMD64 and ARM64) |
| 14 | +- 📦 Comprehensive tool suite pre-installed |
| 15 | +- 🔧 YAML-driven installation system for easy customization |
| 16 | +- 🎯 Automated CI/CD pipeline with semantic versioning |
| 17 | +- 🐳 Published to both Docker Hub and GitHub Container Registry |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +### Pull from Docker Hub |
| 22 | +```bash |
| 23 | +docker pull emberstack/github-actions-runner:latest |
| 24 | +``` |
| 25 | + |
| 26 | +### Pull from GitHub Container Registry |
| 27 | +```bash |
| 28 | +docker pull ghcr.io/emberstack/github-actions-runner:latest |
| 29 | +``` |
| 30 | + |
| 31 | +### Run as GitHub Actions Runner |
| 32 | +```bash |
| 33 | +docker run -d \ |
| 34 | + --name github-runner \ |
| 35 | + -e RUNNER_NAME="my-runner" \ |
| 36 | + -e GITHUB_TOKEN="your-github-token" \ |
| 37 | + -e RUNNER_REPOSITORY_URL="https://github.com/your-org/your-repo" \ |
| 38 | + emberstack/github-actions-runner:latest |
| 39 | +``` |
| 40 | + |
| 41 | +## Included Software |
| 42 | + |
| 43 | +### Core Utilities |
| 44 | +- **GNU Coreutils** - Essential Unix utilities (ls, cp, mv, cat, etc.) |
| 45 | +- **File Utilities** |
| 46 | + - `file` - File type identification |
| 47 | + - `findutils` - Find files and directories |
| 48 | + - `tree` - Directory tree visualization |
| 49 | + - `time` - Time command execution |
| 50 | + |
| 51 | +### Programming Languages & Runtimes |
| 52 | +- **Python 3** with pip - Python interpreter and package manager |
| 53 | +- **PowerShell Core** - Cross-platform PowerShell |
| 54 | +- **Node.js** (LTS 20.x) with npm - JavaScript runtime and package manager |
| 55 | +- **.NET SDK** |
| 56 | + - LTS version - Long Term Support release |
| 57 | + - STS version - Standard Term Support (latest) release |
| 58 | + |
| 59 | +### Cloud & Infrastructure Tools |
| 60 | +- **Azure CLI** - Azure cloud management |
| 61 | +- **AzCopy** - Azure Storage data transfer (latest release) |
| 62 | +- **Ansible** - Infrastructure automation (latest from pip) |
| 63 | + |
| 64 | +### Container Tools |
| 65 | +- **Docker Compose Plugin** - Multi-container orchestration (latest) |
| 66 | +- **Docker Buildx Plugin** - Advanced Docker builds (latest) |
| 67 | + |
| 68 | +### Kubernetes Tools |
| 69 | +- **kubectl** - Kubernetes CLI (latest stable) |
| 70 | +- **Helm** - Kubernetes package manager (latest) |
| 71 | +- **Kustomize** - Kubernetes configuration management (latest) |
| 72 | + |
| 73 | +### Development Tools |
| 74 | +- **Git** - Version control (latest from official PPA) |
| 75 | +- **GitHub CLI** (`gh`) - GitHub operations (latest) |
| 76 | +- **jq** - JSON processor |
| 77 | +- **yq** - YAML processor (latest) |
| 78 | +- **yamllint** - YAML linter (latest from pip) |
| 79 | + |
| 80 | +### Archive & Compression Tools |
| 81 | +- **tar** - Tape archive utility |
| 82 | +- **zip/unzip** - ZIP archive utilities |
| 83 | +- **p7zip-full** (7z) - 7-Zip archiver |
| 84 | + |
| 85 | +### Network Tools |
| 86 | +- **DNS Utilities** |
| 87 | + - `dig` - DNS lookup |
| 88 | + - `nslookup` - Query DNS servers |
| 89 | + - `nsupdate` - Dynamic DNS updates |
| 90 | +- **IP Utilities** |
| 91 | + - `ping` - Network connectivity test |
| 92 | + - `tracepath` - Network path discovery |
| 93 | + - `arping` - ARP level ping |
| 94 | + - `ip` - Show/manipulate routing, network devices |
| 95 | + - `ss` - Socket statistics |
| 96 | +- **Legacy Network Tools** |
| 97 | + - `ifconfig` - Network interface configuration |
| 98 | + - `netstat` - Network statistics |
| 99 | + - `route` - Routing table manipulation |
| 100 | +- **Connection Tools** |
| 101 | + - `ssh` - Secure Shell client |
| 102 | + - `scp` - Secure copy |
| 103 | + - `ftp` - File Transfer Protocol client |
| 104 | + - `telnet` - Telnet client |
| 105 | + - `netcat` (`nc`) - Network debugging |
| 106 | + - `sshpass` - Non-interactive SSH authentication |
| 107 | + |
| 108 | +## Architecture |
| 109 | + |
| 110 | +### Build System |
| 111 | +The image uses a YAML-driven installation system: |
| 112 | +- `src/setup.yaml` - Defines installation steps |
| 113 | +- `src/setup.sh` - Orchestrates the installation process |
| 114 | +- `src/scripts/` - Individual installation scripts for each tool group |
| 115 | + |
| 116 | +### Multi-Architecture Support |
| 117 | +- Automatic architecture detection during build |
| 118 | +- Platform-specific binaries for AMD64 and ARM64 |
| 119 | +- Unified multi-arch manifests in registries |
| 120 | + |
| 121 | +## Building Locally |
| 122 | + |
| 123 | +### Prerequisites |
| 124 | +- Docker or Docker Desktop |
| 125 | +- Docker Buildx (for multi-platform builds) |
| 126 | + |
| 127 | +### Build for Current Platform |
| 128 | +```bash |
| 129 | +docker build -t github-actions-runner -f src/Dockerfile src/ |
| 130 | +``` |
| 131 | + |
| 132 | +### Build for Specific Platform |
| 133 | +```bash |
| 134 | +docker buildx build --platform linux/amd64 -t github-actions-runner -f src/Dockerfile src/ |
| 135 | +``` |
| 136 | + |
| 137 | +### Build Multi-Platform |
| 138 | +```bash |
| 139 | +docker buildx build --platform linux/amd64,linux/arm64 -t github-actions-runner -f src/Dockerfile src/ |
| 140 | +``` |
| 141 | + |
| 142 | +## Customization |
| 143 | + |
| 144 | +### Adding New Tools |
| 145 | + |
| 146 | +1. Create an installation script in `src/scripts/`: |
| 147 | +```bash |
| 148 | +#!/bin/bash |
| 149 | +# src/scripts/install-newtool.sh |
| 150 | +apt-get update |
| 151 | +apt-get install -y newtool |
| 152 | +# Add verification |
| 153 | +if ! command -v newtool &> /dev/null; then |
| 154 | + echo "ERROR: newtool installation failed" |
| 155 | + exit 1 |
| 156 | +fi |
| 157 | +``` |
| 158 | + |
| 159 | +2. Add to `src/setup.yaml`: |
| 160 | +```yaml |
| 161 | +- name: "Install New Tool" |
| 162 | + script: "scripts/install-newtool.sh" |
| 163 | + description: "Description of the tool" |
| 164 | +``` |
| 165 | +
|
| 166 | +3. Make the script executable: |
| 167 | +```bash |
| 168 | +chmod +x src/scripts/install-newtool.sh |
| 169 | +``` |
| 170 | + |
| 171 | +## CI/CD Pipeline |
| 172 | + |
| 173 | +The repository uses GitHub Actions for automated building and releasing: |
| 174 | + |
| 175 | +- **Automatic Builds**: Triggered on push to any branch |
| 176 | +- **Multi-Architecture Builds**: Parallel builds for AMD64 and ARM64 |
| 177 | +- **Semantic Versioning**: Using GitVersion |
| 178 | +- **Container Registries**: Publishes to Docker Hub and GitHub Container Registry |
| 179 | +- **Release Management**: Automatic GitHub releases on main branch |
| 180 | + |
| 181 | +### Version Control |
| 182 | +- Commit messages control version bumps: |
| 183 | + - `feat:` - Minor version bump |
| 184 | + - `fix:` - Patch version bump |
| 185 | + - `feat!:` or `+semver:major` - Major version bump |
| 186 | + |
| 187 | +## Repository Structure |
| 188 | +``` |
| 189 | +├── .github/ |
| 190 | +│ └── workflows/ |
| 191 | +│ └── pipeline.yaml # CI/CD pipeline |
| 192 | +├── src/ |
| 193 | +│ ├── Dockerfile # Main Docker image definition |
| 194 | +│ ├── setup.yaml # Tool installation configuration |
| 195 | +│ ├── setup.sh # Installation orchestrator |
| 196 | +│ └── scripts/ # Individual tool installation scripts |
| 197 | +├── GitVersion.yaml # Semantic versioning configuration |
| 198 | +├── LICENSE # Repository license |
| 199 | +├── README.md # This file |
| 200 | +└── CLAUDE.md # AI assistant guidance |
| 201 | +``` |
| 202 | + |
| 203 | +## Contributing |
| 204 | + |
| 205 | +Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change. |
| 206 | + |
| 207 | +### Development Guidelines |
| 208 | +1. Follow the existing script patterns |
| 209 | +2. Ensure tools work on both AMD64 and ARM64 |
| 210 | +3. Add verification steps in installation scripts |
| 211 | +4. Update documentation for new tools |
| 212 | +5. Test builds locally before submitting PR |
| 213 | + |
| 214 | +## License |
| 215 | + |
| 216 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 217 | + |
| 218 | +## Support |
| 219 | + |
| 220 | +- 🐛 [Report Issues](https://github.com/emberstack/github-actions-runner/issues) |
| 221 | +- 💬 [Discussions](https://github.com/emberstack/github-actions-runner/discussions) |
| 222 | +- 📚 [Documentation](https://github.com/emberstack/github-actions-runner/wiki) |
| 223 | + |
| 224 | +## Acknowledgments |
| 225 | + |
| 226 | +- Built on top of [actions/runner](https://github.com/actions/runner) official images |
| 227 | +- Inspired by the need for comprehensive CI/CD environments |
| 228 | +- Thanks to all contributors and the open-source community |
0 commit comments