chainguard-dev / apko

Build OCI images from APK packages directly without Dockerfile
https://apko.dev
Apache License 2.0
1.12k stars 105 forks source link

Allow to change vendor part of triplet (currently it's hardcoded) #665

Open panekj opened 1 year ago

panekj commented 1 year ago

This isssue is basically affecting https://github.com/chainguard-dev/melange, I'm unsure how relevant it is for apko itself.

Responsible code for that is https://github.com/chainguard-dev/apko/blob/87f7f0ff54fab41ca6dd580343487310e8e25d94/pkg/build/types/types.go#L237-L277

I might look at it later and provide PR, but nothing promised.

Relevant melange code: https://github.com/chainguard-dev/melange/blob/225b6a2a6e78ffa225800d950c88f173ab0d01b9/pkg/build/build.go#L337 https://github.com/chainguard-dev/melange/blob/225b6a2a6e78ffa225800d950c88f173ab0d01b9/pkg/build/pipeline.go#L98-L99

kaniini commented 1 year ago

We are talking about possibly splitting out the triplet code to be its own Go library. At that time, it might be possible to allow the vendor field to be customizable. The default is pc on x86 and unknown on others, except S390 where it is ibm. That's why these triplets are hardcoded the way they are. But we could make it customizable.