-
Notifications
You must be signed in to change notification settings - Fork 909
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
Migrate Falco image from debian to distroless #2181
Comments
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
/remove-lifecycle stale any news? |
cc @LucaGuerra |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
/remove-lifecycle stale |
I think we can use this issue to discuss which image we want and why, and I really agree with the sentiment of using a light image. The hard requirements:
Recently @dlorenc suggested to try the Wolfi image that he develops with his team at Chainguard. I think it's a good idea to try it out, also considering that he'll be able to answer our questions :) |
Yes! Let's help out here! cc @amouat who should be able to jump in from our side when he gets back from vacation. |
Since traditional, this approach is somehow strenuous to implement and associated with restrictions... Maybe this is useful: **good overview on distroless containers ** the tools: abk to oci: to debug distroless containers: |
Hey, I'm new in the Falco community. Once all the requirements along with the base image are discussed and finalized, I would be really interested to work on this one. |
Hi, I'm more than happy to help out here! Is this the main Dockerfile you're looking to port? falco/docker/no-driver/Dockerfile Line 23 in 0b6e243
I can have a look at porting that file as a start. Is there a simple test I can run to confirm things are working as expected? I see there's a lot of builder stuff happening under the |
Hey @amouat , thanks for looking into this! So, as you can see, there are two images for Falco one is the
The simplest thing you can do is running the main falco executable and verifying it runs. i.e. just run the However, if you have BTF support in your kernel (e.g. Ubuntu 22.04) you can very easily run the entire thing from the lightweight image through the (experimental) modern eBPF probe:
This should start Falco with default rules. To check that it is working try spawning a new ubuntu container and running |
Great, thanks @LucaGuerra! I'll have a look this week. @MukulKolpe I'll update progress in this thread so you're welcome to follow along & help test etc. |
Sounds great, @amouat. |
Apologies for the delay, I got thrown by KubeCon and a couple of other things. @LucaGuerra the current Dockerfile uses the precompiled release binaries. I have got that working with our images, but there are potential issues, so I thought I'd take a look at compiling from the source release as well. |
@LucaGuerra @MukulKolpe please take a look at the PR. It's still a WIP but I thought it would be worth getting some feedback. |
I've updated the PR. I think it's pretty good to go now. We added some extra libs to one of our base images (glibc-dynamic) to support this and similar scenarios. |
Thank you so much @amouat ! There is a ton of work for 0.35 already underway so I don't think it will fit this release, but even if it doesn't I would be happy to merge it afterwards after a bit of testing because it looks like a massive improvement to me! |
@LucaGuerra @falcosecurity/core-maintainers @amouat |
/milestone 0.36.0 |
No problem, good luck with the release! |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
/remove-lifecycle stale |
BTW I just rebased so the tests pass again. |
This should solve the issue #2768 |
To better explain what we did to @CashWilliams and others that may be following this issue: We have decided not to fully migrate the no-driver image due to potential breaking changes, but we have introduced an experimental This is now built in master and tagged and signed releases will be available starting with the upcoming Falco 0.36.0, planned for this month. If we don't see issues compared to the regular |
Thanks for the update. We will test moving to https://hub.docker.com/r/falcosecurity/falco-distroless and provide feedback. |
Motivation
To reduce attack surface and patching maintenance, we should use the most minimal base image for the Falco image as possible.
Currently debian:11-slim is used, however Google's distroless image would be more lightweight.
See https://github.com/GoogleContainerTools/distroless/blob/main/base/README.md
Feature
Migrate to distroless as the base image.
Alternatives
TBD
Additional context
A quick test showed that at least some libraries were missing from distroless. There are methods to add these libraries, but I'm not sure what all would need to be included.
The text was updated successfully, but these errors were encountered: