Skip to content

docker: add Dockerfile and publish workflow - #940

Open
Paranoa-dev wants to merge 2 commits into
SorobanGuard:mainfrom
Paranoa-dev:fix/issue-911-dockerfile-workflow
Open

Paranoa-dev wants to merge 2 commits into
SorobanGuard:mainfrom
Paranoa-dev:fix/issue-911-dockerfile-workflow

Conversation

@Paranoa-dev

Copy link
Copy Markdown

Summary

Addresses issue #911 by adding a Dockerfile and GitHub Actions workflow for publishing container images to ghcr.io.

Changes

  1. Dockerfile - Multi-stage build:

    • Builder stage: Rust 1.74-slim with dependency caching
    • Runtime stage: Distroless (gcr.io/distroless/cc-debian12:nonroot) for minimal attack surface
    • Non-root user (UID 65532) for security
    • Binary: soroban-guard
  2. .github/workflows/docker.yml - Publish workflow:

    • Triggers on push to main and version tags (v*)
    • Builds with Docker Buildx
    • Pushes to ghcr.io with semantic versioning tags (latest, v1.2.3, v1.2, sha-...)
    • Uses GHA cache for faster builds
    • Test job verifies the published image (--help, --version, list-checks, init)

Security

  • Distroless base image (no shell, no package manager)
  • Non-root user
  • Minimal attack surface

Testing

The workflow includes a test job that pulls the published image and runs:

  • soroban-guard --help
  • soroban-guard --version
  • soroban-guard list-checks
  • soroban-guard init /tmp/test --force

Closes #911

ChainBid Developer added 2 commits October 22, 2026 13:40
Addresses issue SorobanGuard#910 by adding an  key to soroban-guard.toml
that allows inheriting from a base configuration file.

Changes:
- Added  field to GuardConfig
- Modified load_from_path to load base config and merge with child
- Added merge_scan_config and merge_checks_config helpers
- Merging strategy: child values override base, arrays are combined (deduplicated)

Added tests:
- extends_loads_base_config_and_merges: verifies merge behavior
- extends_with_relative_path: verifies relative path resolution
- extends_nonexistent_file_returns_error: error handling
- load_from_path_handles_extends: explicit path loading

Example usage:

Closes SorobanGuard#910
Addresses issue SorobanGuard#911 by adding:
- Multi-stage Dockerfile (builder + distroless runtime)
- GitHub Actions workflow to build and push to ghcr.io
- Test job to verify the published image works

The Dockerfile uses:
- Builder stage with Rust 1.74 for compilation
- Distroless runtime (gcr.io/distroless/cc-debian12:nonroot) for minimal attack surface
- Non-root user for security

The workflow:
- Triggers on push to main and tags (v*)
- Builds and pushes to ghcr.io with semantic versioning tags
- Runs integration tests on the published image

Closes SorobanGuard#911
@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@Paranoa-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

packaging: add a Dockerfile and a workflow that publishes a container image

1 participant