Skip to content

Add Docker build and push CI/CD pipeline#1

Merged
r33drichards merged 2 commits into
masterfrom
claude/docker-build-push-gha-D7R1C
Jan 25, 2026
Merged

Add Docker build and push CI/CD pipeline#1
r33drichards merged 2 commits into
masterfrom
claude/docker-build-push-gha-D7R1C

Conversation

@r33drichards

Copy link
Copy Markdown
Owner

Summary

This PR adds automated Docker image building and pushing to the project's CI/CD pipeline using GitHub Actions and Nix.

Key Changes

  • New GitHub Actions Workflow (.github/workflows/docker-build-push.yml)

    • Triggers on pushes and PRs to master and main branches
    • Builds Docker image using Nix flakes
    • Pushes image to Docker Hub with commit SHA tag on all builds
    • Pushes image with latest tag only on main/master branch pushes
    • Uses skopeo for secure Docker image pushing with credentials
  • Updated Nix Flake Configuration (flake.nix)

    • Extracted mcp-exec package into a variable for reusability
    • Added new packages.docker output using dockerTools.buildLayeredImage
    • Docker image includes essential runtime dependencies:
      • bashInteractive - shell support
      • coreutils - standard utilities
      • inetutils - networking tools
    • Configured container with:
      • Entry point: mcp-exec binary
      • Exposed port: 8080/tcp
      • Proper PATH environment variable

Implementation Details

  • Uses Nix's dockerTools.buildLayeredImage for efficient, reproducible Docker builds
  • Leverages GitHub secrets for Docker Hub credentials (DOCKER_USERNAME, DOCKER_PASSWORD)
  • Supports multi-architecture builds (x86_64-linux, aarch64-linux) via existing flake configuration
  • Commit SHA tagging enables easy tracking of image versions to specific commits

- Add Docker image build to flake.nix using dockerTools.buildLayeredImage
- Create GitHub Actions workflow that builds with Nix and pushes with skopeo
- Push commit SHA tag on PRs and main branch
- Push latest tag only on main/master branch
@r33drichards r33drichards merged commit 4cb68f1 into master Jan 25, 2026
4 checks passed
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