bowtie-json-schema / bowtie

JSON Schema in every programming language
https://bowtie.report/
Other
52 stars 40 forks source link

Investigate using Buildkit for images #903

Open Julian opened 7 months ago

Julian commented 7 months ago

We want to preserve (and promote as preferred) using podman, but there are some nice things apparently in Buildkit, including that it frees us from Dockerfile syntax.

https://pythonspeed.com/articles/docker-cache-pip-downloads/ has one example of where we could try to use it.

Julian commented 3 months ago

@adwait-godbole this is another ticket you maybe should have on your radar -- specifically, I don't know for sure, but I would have a good suspicion that buildkit (or really one of the other supported image formats by buildkit) might be useful for things like your discovery about older ruby versions being needed for older json-schemer versions.

adwait-godbole commented 3 months ago

Alright! Will have a look!

adwait-godbole commented 3 months ago

might be useful for things like your discovery about older ruby versions being needed for older json-schemer versions.

@Julian sorry to ask this but how exactly does it prove useful 😅 ? I mean the older ruby version problem is primarily happening because our base image in the Dockerfile is ruby:3-alpine. Unless we don't change that base image itself (to something like ruby:2-alpine), older json-schemer versions are not gonna work right ? So how does Buildkit help in that ?

Julian commented 3 months ago

Other build backends for Buildkit do not use static files (i.e. a Dockerfile). As you say, the primary issue is "we want to use ruby:2-alpine sometimes, and ruby:3-alpine other times", and AFAIK that isn't easy to do with Dockerfile syntax (though maybe indeed it does allow parameterizing the base image), but presumably would be with e.g. the moby-py (or other) systems.