Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Nov 10, 2025

Docker Deployment with Multi-Registry Support

This PR adds comprehensive Docker deployment infrastructure with multi-architecture builds and dual registry publishing.

Features

Multi-Architecture Support

  • 🏗️ Platforms: linux/amd64, linux/arm64
  • 🔄 Digest-based builds: Platform-specific images combined into multi-arch manifests

Dual Registry Publishing

  • 📦 GitHub Container Registry: ghcr.io/techprimate/github-actions-utils-cli
  • 🐳 Docker Hub: docker.io/techprimate/github-actions-utils-cli

Modern Metadata Management

  • 🏷️ OCI-compliant labels: Using docker/metadata-action@v5
  • 📝 Annotations: Attached at manifest and index levels
  • 🔖 Semantic versioning: Automatic version tags (latest, v1.0.0, 1.0, 1)

Workflow Structure

  • ♻️ Reusable workflows: build-cli-docker.yml for maintainability
  • 🧪 PR dry-run mode: Test Docker builds in pull requests
  • Build caching: Registry-based caching for faster builds

What's Included

New Files

  • .dockerignore - Optimized build context
  • Dockerfile - Multi-stage build with buildpack-deps:bookworm
  • .github/workflows/build-cli-docker.yml - Reusable Docker build workflow

Updated Files

  • .github/workflows/release.yml - Integrated Docker build workflow
  • Makefile - New Docker targets (build-linux, docker-build, docker-test, docker-run)
  • README.md - Docker usage instructions and examples
  • AGENTS.md - Complete Docker deployment documentation

Docker Images

Registries

# Pull from GitHub Container Registry
docker pull ghcr.io/techprimate/github-actions-utils-cli:latest

# Pull from Docker Hub
docker pull docker.io/techprimate/github-actions-utils-cli:latest

Available Tags

  • latest - Latest main branch build
  • v1.0.0 - Specific version releases
  • 1.0 - Major.minor version
  • 1 - Major version

Image Details

  • Base: buildpack-deps:bookworm (~200MB)
  • Platforms: linux/amd64, linux/arm64
  • Entry point: /usr/local/bin/github-actions-utils-cli

Usage Examples

MCP Client Configuration

{
  "mcpServers": {
    "github-actions-utils": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/techprimate/github-actions-utils-cli:latest",
        "mcp"
      ]
    }
  }
}

Local Development

# Build Linux binaries
make build-linux

# Build Docker image
make docker-build

# Test Docker image
make docker-test

# Run interactively
make docker-run

Required Configuration

To enable Docker Hub publishing, add the following to repository settings:

Variables

  • DOCKERHUB_USERNAME - Docker Hub username

Secrets

  • DOCKERHUB_TOKEN - Docker Hub access token

Workflow Behavior

On Main Branch Push

  • ✅ Builds multi-arch images
  • ✅ Publishes to both registries
  • ✅ Tags as latest

On Version Tag (e.g., v1.0.0)

  • ✅ Builds multi-arch images
  • ✅ Publishes to both registries
  • ✅ Creates semantic version tags (1.0.0, 1.0, 1)

On Pull Request

  • ✅ Builds images (validation only)
  • ❌ Does not publish

Benefits

  1. Easy Distribution - Users can pull pre-built images instead of building from source
  2. Multi-Platform - Native support for both x86 and ARM architectures
  3. High Availability - Images available on both GitHub and Docker Hub
  4. Container Native - Perfect for containerized environments and CI/CD
  5. Metadata Rich - OCI-compliant labels for better discoverability

Testing

The workflow includes comprehensive testing:

  • Build validation on PRs
  • Multi-platform builds
  • Registry authentication
  • Manifest creation and inspection

Related: Closes any Docker deployment issues (if applicable)

Add comprehensive Docker deployment infrastructure with reusable workflows,
multi-architecture builds, and dual registry publishing.

Features:
- Multi-architecture Docker images (linux/amd64, linux/arm64)
- Publish to GitHub Container Registry (ghcr.io) and Docker Hub (docker.io)
- Reusable workflow structure for maintainability
- OCI-compliant labels and annotations using docker/metadata-action
- Build caching for faster builds
- PR dry-run mode for testing

Workflow Structure:
- build-cli-docker.yml: Reusable workflow for building and publishing images
- release.yml: Updated to call Docker build workflow
- Digest-based multi-arch manifest creation

Docker Images:
- ghcr.io/techprimate/github-actions-utils-cli
- docker.io/techprimate/github-actions-utils-cli

Tags:
- latest: Latest main branch build
- v1.0.0: Specific version releases
- 1.0, 1: Semantic version tags

Infrastructure:
- Makefile targets: build-linux, docker-build, docker-test, docker-run
- .dockerignore for optimized build context
- Dockerfile with buildpack-deps:bookworm base
- Comprehensive documentation in README.md and AGENTS.md

Requires GitHub secrets/variables:
- DOCKERHUB_USERNAME (variable)
- DOCKERHUB_TOKEN (secret)
@philprime philprime force-pushed the chore/docker-deployment branch from 359d002 to 7ed15fa Compare November 10, 2025 14:54
@philprime philprime requested a review from Copilot November 10, 2025 14:55
@philprime
Copy link
Member Author

@sentry review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Docker container support to the GitHub Actions Utils CLI project, enabling deployment and distribution via Docker images published to GitHub Container Registry and Docker Hub.

  • Adds Dockerfile for multi-platform container builds (linux/amd64, linux/arm64)
  • Implements automated Docker image build and publish workflow via build-cli-docker.yml
  • Adds Makefile targets for local Docker development and testing

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Dockerfile New multi-platform Dockerfile using buildpack-deps:bookworm base image with architecture-specific binary selection
.dockerignore Excludes unnecessary files from Docker build context while allowing Linux binaries
Makefile Adds build-linux, docker-build, docker-test, and docker-run targets for Docker workflows
.github/workflows/build-cli-docker.yml New reusable workflow for building and publishing multi-platform Docker images to GHCR and Docker Hub
.github/workflows/release.yml Integrates Docker build into release pipeline with pull request dry-run support
README.md Documents Docker installation, usage, and development workflows
AGENTS.md Documents Docker deployment details, image registries, and publishing process

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

philprime and others added 5 commits November 10, 2025 16:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@philprime philprime enabled auto-merge (squash) November 10, 2025 15:10
@philprime philprime merged commit c283f99 into main Nov 10, 2025
16 checks passed
@philprime philprime deleted the chore/docker-deployment branch November 10, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants