Skip to content

feat(docker): switch to musl targets and distroless/static-debian12#3524

Merged
bug-ops merged 1 commit intomainfrom
agent-a2598acc5224f677d
Apr 27, 2026
Merged

feat(docker): switch to musl targets and distroless/static-debian12#3524
bug-ops merged 1 commit intomainfrom
agent-a2598acc5224f677d

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 27, 2026

Summary

  • Switch release build targets from *-linux-gnu (glibc) to *-linux-musl (static)
  • Replace debian:bookworm-slim final image with gcr.io/distroless/static-debian12:nonroot
  • Add libsqlite3-sys with bundled feature so SQLite is compiled statically (no system lib dependency)
  • Improve error message when git is absent at runtime (skill install via URL gracefully reports the issue instead of OS error)

Motivation

Trivy scan of the previous image found 1 CRITICAL + 8 HIGH CVEs, mostly from unnecessary packages (nodejs, curl, python3, etc.) and glibc. distroless/static-debian12 has zero CVEs and is ~6 MB vs ~665 MB.

Breaking change

System git is no longer available inside the container. skill install <url> will return a clear error message when invoked in a containerized deployment. Branch detection in core already handled git absence gracefully via .ok().

Open question

aarch64-unknown-linux-musl cross-compilation uses the default cross image. If CI fails on aarch64, a Cross.toml with image = "messense/rust-musl-cross:aarch64-musl" may be needed.

@github-actions github-actions Bot added skills zeph-skills crate rust Rust code changes dependencies Dependency updates ci CI/CD configuration enhancement New feature or request size/S Small PR (11-50 lines) labels Apr 27, 2026
Replace debian:bookworm-slim with gcr.io/distroless/static-debian12:nonroot
in the release Docker image. Build Linux binaries for musl targets
(x86_64-unknown-linux-musl, aarch64-unknown-linux-musl) to produce fully
static binaries with no glibc dependency.

Add libsqlite3-sys with the bundled feature to compile SQLite from source,
removing the libsqlite3 system dependency required for static musl builds.

Improve the error message when git is absent from PATH in
SkillManager::install_from_url to provide a clear actionable message
instead of a raw OS error string.

BREAKING CHANGE: system git is no longer available inside the container;
skill hot-reload via git is gracefully disabled when git binary is absent
@bug-ops bug-ops force-pushed the agent-a2598acc5224f677d branch from 4e7c4b8 to 2fcfa15 Compare April 27, 2026 16:21
@bug-ops bug-ops merged commit 2c99bef into main Apr 27, 2026
32 checks passed
@bug-ops bug-ops deleted the agent-a2598acc5224f677d branch April 27, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration dependencies Dependency updates enhancement New feature or request rust Rust code changes size/S Small PR (11-50 lines) skills zeph-skills crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant