chore: investigate using chainguard apko images #548
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar#548
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub.
Original GitHub issue: #1733
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1733
Original created: 2025-10-10T03:10:31Z
https://github.com/chainguard-dev/rules_apko
Imported GitHub comment.
Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/issues/1733#issuecomment-3388624699
Original created: 2025-10-10T07:25:03Z
This one is a bit tricky. I tried to a config today, but ran into multiple checksum failures when Bazel tried to download the Chainsaw packages for the configured base image. No idea how that is even possible as I have re-generated a new lock file.
For now, I have removed the config. Take another look on another day.
Imported GitHub comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1733#issuecomment-3978663138
Original created: 2026-03-01T00:01:17Z
wondering if we should revisit this sooner than later.. there are other secure container options maybe we can look into?
Imported GitHub comment.
Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/issues/1733#issuecomment-3979946487
Original created: 2026-03-01T13:20:45Z
From what I have seen today,
this would imply a major rewrite of the Bazel config for building all
container images. Right now, the oci rules are basically abused as docker
replacement with an exceptionally ugly set of Docker files.
Conventionally you would write something like this
https://github.com/marvin-hansen/alpha-system/blob/main/alpha_system/mds/mddb/mddb_service/BUILD.bazel
And you get cacheable image builds for free by basically just copying the
build binary into the OCI stub.
Not sure if you really want to open up this can of worms. However, these
Bazel build files are trivial to maintain so there is that.
On Sun, Mar 1, 2026 at 08:01 Michael Freeman @.***>
wrote:
Imported GitHub comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1733#issuecomment-3981804846
Original created: 2026-03-02T03:26:54Z
Needs to be done, I can take care of it unless you really want to spend 2-3 days dealing with that
Imported GitHub comment.
Original author: @marvin-hansen
Original URL: https://github.com/carverauto/serviceradar/issues/1733#issuecomment-3981966257
Original created: 2026-03-02T04:25:33Z
Sounds urgent to me. I cannot block 3 days for this, so I am afraid you have to take over now.
In this case, it might be better to do it your way e.g. replace the Rust binaries with Elexir as you alrady suggested and convert the existing Dockerfile mess into proper Bazel container builds.
here is a sample Bazel config for full apko based Image building:
https://github.com/marvin-hansen/alpha-system
The apko rules are in:
https://github.com/marvin-hansen/alpha-system/tree/main/build/images/base_image
And the custom image build rule is here:
https://github.com/marvin-hansen/alpha-system/blob/main/build/container.bzl
And the MODULE config for Apko Rules:
https://github.com/marvin-hansen/alpha-system/blob/main/MODULE.bazel
Parallel container build and run has been done with rules multun the the root BUILD config file
https://github.com/marvin-hansen/alpha-system/blob/main/BUILD.bazel
Meaning, when you call
bazel build //:push
All those containers are build in parallel because jobs = 0 is set. this is a bit upside down because normally one would expect parallel=true, but somehow the rule author decided jobs = 0 is it..
Aliases are resolved in:
https://github.com/marvin-hansen/alpha-system/blob/main/alias/service/BUILD.bazel
and a typical Bazel native build file with OCI config looks like:
https://github.com/marvin-hansen/alpha-system/blob/main/alpha_system/mds/mddb/mddb_service/BUILD.bazel
Hope that helps. If you run into a major blocker, let me know and I try to helpl as much as I can.
In the meantime, I pause the Rust work until this has been resolved.