tonistiigi / xx

Dockerfile cross-compilation helpers
MIT License
379 stars 31 forks source link

Feature Request: Supporting a Wolfi base image #160

Open aaomidi opened 4 months ago

aaomidi commented 4 months ago

Wolfi: https://www.chainguard.dev/unchained/introducing-wolfi-the-first-linux-un-distro

Pretty similar to alpine, but with different repositories.

tonistiigi commented 3 months ago

What's the ask in here? xx does not pick a specific base image but you add it on top of whatever (supported) distro you use. Afaik wolfi is alpine with glibc hacks so I'm not sure if all our alpine detections work automatically or not. I also don't know if they provide enough packages and what architectures they support. Is the ask to add wolfi into our test matrix?

polarathene commented 3 months ago

Isn't wolfi quite a bit different to use? They publish lots of images with specific packages and no package manager.

To use the package manager you had to build custom images via their build tools with YAML configuration I think? Not a shell script or manual CLI input. I haven't kept up with it, so perhaps that's not the case now 🤷‍♂️

I recall trying to use the Wolfi rust image, but it could not build a project that wasn't pure rust. If you needed openssl and a regular build environment to support that, it was much more work to get going vs distro images.


Can you provide an example of how you'd want to use Wolfi with xx?

Perhaps a Go or Python project if you're most familiar with that (based on quick look at your profile) that uses a native dep like openssl or depends on make / cmake to build something as part of the process?

tonistiigi commented 3 months ago

xx is for Dockerfiles. If you are building from apko definition for example (or https://github.com/tonistiigi/buildkit-alpine) then you would likely want some other cross-compile solution for that builder (or the builder itself needs to have some tight xx integration). I guess you can use wolfi images by just

FROM cgr.dev/chainguard/wolfi-base
RUN apk add clang

But if nobody expects them to be used like this then there is no point of adding it to supported base images for xx test matrix as well.