Skip to content

chore: Docker build from prebuilt release binaries instead of source #798

@joshrotenberg

Description

@joshrotenberg

Current behavior

The Docker workflow (docker.yml) builds both redisctl and redisctl-mcp from source using rust:1.90-alpine. It builds multi-platform (linux/amd64, linux/arm64), with the ARM build cross-compiled via QEMU -- this is slow.

Proposal

Download the prebuilt release binaries in the Dockerfile instead of compiling from source. Docker's TARGETARCH build arg can select the correct binary per platform.

Advantages

  • Faster builds -- eliminates Rust compilation and QEMU cross-compilation
  • Consistency -- the Docker image contains the exact same binaries as the GitHub release and cargo install
  • Simpler Dockerfile -- no build dependencies (rust, musl-dev, openssl-dev, pkgconfig)

Considerations

  • Workflow ordering -- Docker build must wait for release artifacts to be published. Can use workflow_run trigger or chain jobs within the release workflow. We already have ordering constraints in the release process so this isn't a new problem.
  • C library compatibility -- current release binaries are *-unknown-linux-gnu. The Alpine final image would need to switch to Debian slim, or we'd need to add musl targets to the release matrix.

Priority

Low -- the current approach works, it's just slow. The GHA cache (cache-from: type=gha) helps with incremental builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions