Skip to content

fix: multi-arch Docker builds - switch to rustls for musl compatibility#3

Merged
isaaguilar merged 13 commits intomasterfrom
copilot/fix-multi-arch-builds
Jan 30, 2026
Merged

fix: multi-arch Docker builds - switch to rustls for musl compatibility#3
isaaguilar merged 13 commits intomasterfrom
copilot/fix-multi-arch-builds

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

Fix GitHub Actions Build - Complete Solution Applied ✅

All Issues Identified and Fixed:

1. Version Validation Error ✅

Error: Version must be bumped from master version (0.0.2)
Fix: Bumped version to 0.0.3 in Cargo.toml

2. TARGETARCH Build Error ✅

Error: failed to parse stage name "builder-": invalid reference format
Fix: Removed pre-FROM ARG TARGETARCH, added default ${TARGETARCH:-amd64}

3. OpenSSL/TLS for musl Targets ✅ - MAJOR FIX

Errors encountered:

  • OpenSSL not found via pkg-config
  • OPENSSL_VENDORED=yes didn't enable the vendored feature
  • Native-tls incompatible with musl static builds

Final Solution: Switched from native-tls to rustls (pure Rust TLS)

Changes Made:

  1. Cargo.toml (workspace dependencies):

    # Before
    reqwest = { version = "0.12.12", features = ["json"] }
    hyper-tls = "0.6.0"
    
    # After
    reqwest = { version = "0.12.12", default-features = false, features = ["json", "rustls-tls"] }
    hyper-rustls = "0.27.1"
  2. hive/Cargo.toml:

    • Replaced hyper-tls with hyper-rustls
    • Removed native-tls feature requirement
  3. All Dockerfiles (hive, agent, hive-hq):

    • Removed OpenSSL packages: pkg-config, libssl-dev, perl, make
    • Removed OPENSSL_STATIC and OPENSSL_VENDORED env vars
    • Simplified to just protobuf-compiler and ca-certificates

Why rustls?

  • Pure Rust implementation - no C dependencies
  • Standard for musl static builds
  • Faster compilation (no OpenSSL source build)
  • More portable binaries
  • Used by major Rust projects (tokio, hyper, etc.)

Build Status:
The fixes are complete and pushed. The workflow shows "action_required" which indicates it needs manual approval from the repository owner (common for bot-initiated PRs as a security measure).

Expected Result:
Once approved and re-run, the multi-arch Docker builds should complete successfully for both linux/amd64 and linux/arm64 platforms without any OpenSSL/TLS issues.


Summary of Commits:

  1. Version bump (0.0.2 → 0.0.3)
  2. TARGETARCH scope fix
  3. Multiple OpenSSL attempts (vendored, NO_PKG_CONFIG)
  4. Final solution: Switch to rustls
  5. Documentation cleanup
Original prompt

Fix the github actions multi-arch builds. #file:Dockerfile #file:Dockerfile #file:Dockerfile #file:build.yml

The user has attached the following file paths as relevant context:

  • .github/workflows/build.yml
  • hive-hq/Dockerfile
  • agent/Dockerfile
  • hive/Dockerfile

Created from VS Code.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…file

Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GitHub Actions multi-arch builds fix(ci): remove invalid command substitution in agent Dockerfile ENV Jan 30, 2026
Copilot AI requested a review from isaaguilar January 30, 2026 05:11
Copilot AI and others added 3 commits January 30, 2026 11:45
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title fix(ci): remove invalid command substitution in agent Dockerfile ENV fix(ci): resolve commit validation and multi-arch build failures Jan 30, 2026
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title fix(ci): resolve commit validation and multi-arch build failures chore: bump version to 0.0.3 to satisfy workflow validation Jan 30, 2026
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title chore: bump version to 0.0.3 to satisfy workflow validation fix: resolve multi-arch Docker build failures and version validation Jan 30, 2026
…ilds

Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title fix: resolve multi-arch Docker build failures and version validation fix: multi-arch Docker builds failing on TARGETARCH and missing OpenSSL dependencies Jan 30, 2026
Copilot AI and others added 2 commits January 30, 2026 14:30
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
…kg-config

Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title fix: multi-arch Docker builds failing on TARGETARCH and missing OpenSSL dependencies fix: multi-arch Docker builds - TARGETARCH scope and OpenSSL musl compilation Jan 30, 2026
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title fix: multi-arch Docker builds - TARGETARCH scope and OpenSSL musl compilation fix: multi-arch Docker builds - TARGETARCH scope and musl OpenSSL compilation Jan 30, 2026
Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
Copilot AI changed the title fix: multi-arch Docker builds - TARGETARCH scope and musl OpenSSL compilation fix: multi-arch Docker builds - switch to rustls for musl compatibility Jan 30, 2026
README.md Outdated
Comment on lines +6 to +7
<!-- Multi-arch Docker builds fixed -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Remove this line and include [skip ci] in commit message

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Removed the comment line from README.md in commit d674f22.

Co-authored-by: isaaguilar <16406451+isaaguilar@users.noreply.github.com>
@isaaguilar
Copy link
Copy Markdown
Member

@copilot lgtm

@isaaguilar isaaguilar marked this pull request as ready for review January 30, 2026 23:53
@isaaguilar isaaguilar merged commit 956ecad into master Jan 30, 2026
1 check passed
@isaaguilar isaaguilar deleted the copilot/fix-multi-arch-builds branch January 30, 2026 23:54
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