Pre-built Docker images for Panda project CI/CD pipelines. These images include all common dependencies needed for testing Panda CMS, Panda Core, and Panda Editor, significantly reducing CI setup time.
Images are available at: ghcr.io/tastybamboo/panda-ci
To view available images:
# View all available tags
gh api /orgs/tastybamboo/packages/container/panda-ci/versions --jq '.[].metadata.container.tags[]' | sort -uReplace your GitHub Actions job configuration:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libvips42 imagemagick chromium-browser
# ... more installation steps
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: truejobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/tastybamboo/panda-ci:ruby-3.4.8
steps:
- uses: actions/checkout@v4
- name: Bundle install
run: bundle install --jobs 4 --retry 3- Ruby versions: 3.2.9, 3.3.10, 3.4.8 (latest)
- System packages:
- PostgreSQL client
- ImageMagick & libvips (image processing)
- Chromium & ChromeDriver (system tests)
- Xvfb (headless browser testing)
- Build essentials
- Pre-installed gems:
- bundler 2.7.2
- Common testing/linting gems (rspec, standard, rubocop, etc.)
- Configuration:
- UTC timezone
- en_US.UTF-8 locale
- Chromium configured for headless operation
ghcr.io/tastybamboo/panda-ci:latest- Ruby 3.4.8 (amd64 + arm64)
ghcr.io/tastybamboo/panda-ci:ruby-3.4.8- Ruby 3.4.8ghcr.io/tastybamboo/panda-ci:ruby-3.3.10- Ruby 3.3.10ghcr.io/tastybamboo/panda-ci:ruby-3.2.9- Ruby 3.2.9
- Daily/Push builds:
linux/amd64only (optimized for CI speed) - Weekly/Manual builds:
linux/amd64+linux/arm64(for local development on Apple Silicon)
For reproducible builds:
ghcr.io/tastybamboo/panda-ci:ruby-3.4.8-20251219ghcr.io/tastybamboo/panda-ci:ruby-3.3.10-20251110ghcr.io/tastybamboo/panda-ci:ruby-3.2.9-20251110
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/tastybamboo/panda-ci:ruby-3.4.8
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup database
run: |
bundle install
bundle exec rails db:create db:schema:load
env:
DATABASE_URL: postgresql://postgres:password@postgres/test
- name: Run tests
run: bundle exec rspecjobs:
test:
strategy:
matrix:
ruby-version: ['3.2.9', '3.3.10', '3.4.8']
runs-on: ubuntu-latest
container:
image: ghcr.io/tastybamboo/panda-ci:ruby-${{ matrix.ruby-version }}
steps:
- uses: actions/checkout@v4
- run: bundle install
- run: bundle exec rspecjobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/tastybamboo/panda-ci:ruby-3.4.8
steps:
- uses: actions/checkout@v4
- name: Cache gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rspecYou can use these images locally for consistent development environments:
# Pull the image
docker pull ghcr.io/tastybamboo/panda-ci:ruby-3.4.8
# Run tests in a container
docker run --rm -v $(pwd):/app ghcr.io/tastybamboo/panda-ci:ruby-3.4.8 \
bash -c "bundle install && bundle exec rspec"
# Interactive development
docker run -it --rm -v $(pwd):/app ghcr.io/tastybamboo/panda-ci:ruby-3.4.8 bashThe images are automatically rebuilt:
- When the Dockerfile changes
- Weekly (Sunday at midnight UTC) for security updates
- On-demand via workflow dispatch
Image builds resolve versions dynamically at build time β there are no hardcoded version lists to keep up to date:
- Ruby:
bin/resolve-ruby-versionsfetches the official release index from ruby-lang.org and picks the latest stable patch release of every supported minor line (perversion-config.json) - Rails:
bin/resolve-rails-matrixfetches release data from RubyGems and builds the full Ruby x Rails matrix, applying the compatibility exclusions fromversion-config.json - Weekly rebuilds (Sunday at midnight UTC) therefore pick up new Ruby and Rails patch releases automatically
Minor-line alias tags (e.g. ruby-4.0) always point at the most recent
patch build, so downstream repositories can pin a minor line and receive
patch updates without any changes.
To trigger builds manually:
gh workflow run build-and-publish.yml # Ruby base images
gh workflow run build-rails-images.yml # Ruby + Rails imagesTo resolve versions locally:
bin/resolve-ruby-versions | jq .
bin/resolve-rails-matrix | jq .If you need to customize the image:
- Fork this repository
- Modify the
Dockerfile - Update the
IMAGE_NAMEin.github/workflows/build-and-publish.yml - Push to your fork's main branch
The GitHub Actions workflow will automatically build and publish to your GitHub Container Registry.
Typical time savings per CI run:
- Before: ~45-60 seconds for dependency installation
- After: ~5-10 seconds for container pull (cached after first run)
- Net savings: 35-50 seconds per job
For a matrix with 9 jobs (3 Ruby Γ 3 Rails versions):
- Total savings: ~5-7 minutes per CI run
Ensure you're using actions/checkout@v4 which is compatible with containerized jobs.
The container runs as root by default. If you need a non-root user, the panda user is available:
container:
image: ghcr.io/tastybamboo/panda-ci:ruby-3.3
options: --user pandaUse the service name as the hostname:
DATABASE_URL: postgresql://postgres:password@postgres/testThe images are public, but ensure you're using the correct registry URL: ghcr.io/tastybamboo/panda-ci
This repository includes comprehensive CI validation:
- Pull Request CI: Automatic validation of YAML, Dockerfiles, and image builds
- Local Git Hooks: Pre-commit and pre-push validation with Lefthook
See docs/CI.md for full CI documentation.
-
Install Git Hooks (recommended):
./bin/setup-hooks
This installs Lefthook for automatic pre-commit and pre-push validation.
-
Run Local Validation:
# Validate YAML files yamllint -c .yamllint . # Build and test images locally docker build -f Dockerfile -t test:main . docker run --rm test:main ruby -v
Copyright 2024-2025 Otaina Limited. Available under the BSD 3-Clause License.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For issues or questions, please open an issue.