fix: Docker build failures for service installation #10

Closed
delandtj wants to merge 2 commits from fix/docker-build-failures into development
Member
  • Add libseccomp-dev and libcap-ng-dev to builder stage (zinit link deps)
  • Add optional build.cmd field for services without make install targets
  • Add optional build.binary field for correct install tracking
  • Remove CARGO_TARGET_DIR from service builds (broke Makefile target paths)
  • Ensure dirs exist in _InstallService before writing tracking info
  • Add custom build commands for hero_forge, hero_runner, hero_supervisor, mycelium
  • Fix hero_aibroker binary name detection (exec starts with sh -c)
- Add libseccomp-dev and libcap-ng-dev to builder stage (zinit link deps) - Add optional build.cmd field for services without make install targets - Add optional build.binary field for correct install tracking - Remove CARGO_TARGET_DIR from service builds (broke Makefile target paths) - Ensure dirs exist in _InstallService before writing tracking info - Add custom build commands for hero_forge, hero_runner, hero_supervisor, mycelium - Fix hero_aibroker binary name detection (exec starts with sh -c)
fix: Docker build failures for service installation
Some checks are pending
Build and Test / build (pull_request) Waiting to run
3366d6fc18
- Add libseccomp-dev and libcap-ng-dev to builder stage (zinit link deps)
- Add optional build.cmd field for services without make install targets
- Add optional build.binary field for correct install tracking
- Remove CARGO_TARGET_DIR from service builds (broke Makefile target paths)
- Ensure dirs exist in _InstallService before writing tracking info
- Add custom build commands for hero_forge, hero_runner, hero_supervisor, mycelium
- Fix hero_aibroker binary name detection (exec starts with sh -c)
Owner

Critical Review Comments

  • Docker Dependencies: The addition of libseccomp-dev and libcap-ng-dev in the builder stage is correct for compilation. However, please verify if these are required as runtime dependencies in the final image stage. If the binaries are dynamically linked, the app will fail to start without the runtime libs.
  • Shell Execution: Switching to sh -c for build.cmd adds flexibility but introduces shell-injection risks if service configs are ever pulled from external/untrusted sources. Consider if we can execute the binary directly without a shell wrapper.
  • Cargo Cache: Removing CARGO_TARGET_DIR disables global build caching. This will significantly slow down builds in environments where multiple services are built sequentially. Can we resolve the path issue instead of removing the env var?
  • Binary Tracking: The binary field is a good stop-gap, but we should eventually aim for a "convention over configuration" approach where the crate name always matches the service name.
### Critical Review Comments - **Docker Dependencies:** The addition of `libseccomp-dev` and `libcap-ng-dev` in the builder stage is correct for compilation. However, please verify if these are required as runtime dependencies in the final image stage. If the binaries are dynamically linked, the app will fail to start without the runtime libs. - **Shell Execution:** Switching to `sh -c` for `build.cmd` adds flexibility but introduces shell-injection risks if service configs are ever pulled from external/untrusted sources. Consider if we can execute the binary directly without a shell wrapper. - **Cargo Cache:** Removing `CARGO_TARGET_DIR` disables global build caching. This will significantly slow down builds in environments where multiple services are built sequentially. Can we resolve the path issue instead of removing the env var? - **Binary Tracking:** The `binary` field is a good stop-gap, but we should eventually aim for a "convention over configuration" approach where the crate name always matches the service name.
Merge branch 'development' into fix/docker-build-failures
Some checks failed
Build and Test / build (pull_request) Failing after 2s
7ecd9fb7da
Owner

Good points @thabeta

If the binaries are dynamically linked, the app will fail to start without the runtime libs.

Should we aim for statically linked throughout?

Good points @thabeta `If the binaries are dynamically linked, the app will fail to start without the runtime libs.` Should we aim for statically linked throughout?
delandtj closed this pull request 2026-02-12 10:05:27 +00:00
Some checks failed
Build and Test / build (pull_request) Failing after 2s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_services!10
No description provided.