-
Notifications
You must be signed in to change notification settings - Fork 32
bpftool: make the bpftool
binary static
#366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
See #362 for full context Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
306aff1
to
cb2d0b1
Compare
Update QEMU to fix https://gitlab.com/qemu-project/qemu/-/issues/1763 Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
cb2d0b1
to
c9efe2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks it looks good to me, definitely better than what's here.
The only thing that is missing so that we could use it with Tetragon and avoid doing the line you copied on every build is a multiarch image with x86_64 and aarch64. For Tetragon we cross compiled this step but now that we have aarch64 nodes in GitHub maybe you could simply natively build the two images and push a multiarch image. Of course no need to do it in this PR but would be amazing so that we can drop that code entirely on the Tetragon side!
Here are the cross-compilation shenanigans https://github.com/cilium/tetragon/blob/2258168df5bf524547318241979f7a040dc13763/Dockerfile#L44-L76
oh I just noticed this, you already build for arm64 and it appears it works, nevermind all I said before ahah |
See #349 This PR configures renovate to recognize custom `# renovate:` comments in Dockerfiles. One such comment is already present (here)[https://github.com/cilium/image-tools/blob/49d7b282e76f941d6bf5abc4f125d14a1a7b2211/images/bpftool/Dockerfile#L12] (since #366) and will allow to validate that this renovate config works as expected. If that is the case, we will be able to add more renovate comments to manage the versioning of other tools as listed in #349. This is largely inspired from the renovate config in cilium/cilium. Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
See #349 This PR configures renovate to recognize custom `# renovate:` comments in Dockerfiles. One such comment is already present [here](https://github.com/cilium/image-tools/blob/49d7b282e76f941d6bf5abc4f125d14a1a7b2211/images/bpftool/Dockerfile#L12) (since #366) and will allow to validate that this renovate config works as expected. If that is the case, we will be able to add more renovate comments to manage the versioning of other tools as listed in #349. This is largely inspired from the renovate config in cilium/cilium. Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
See #362 for full context
Summary of the changes:
bpftool
is now statically linkedlibbpf/bpftool
FROM scratch
baseLayout of the final image:

Note: the new test running
ldd
on the newly built binary was initially failing for the arm64 build withldd: exited with unknown exit code (139)
error (see job logs). This turned out to be an old qemu bug (issue) that's been fixed for some time. In order to pick up that fix, I updated qemu by replacing the oldbinfmt
step with thedocker/setup-qemu-action
action.Closes #362