Closed vdemeester closed 5 years ago
on the whole it LGTM. One thing I still don't like about multi-stage (there are a few things, but this one currently) is that the intermediary build steps are not named, pushed and associated to the final image. So that provenance is lost. If the tool doesn't include the git commit in a version variable or something, then the version used to build is lost. For debugging and maintaining audit info, it makes gaps. To that end buildah does include git commit, but runc does not.
One thing I still don't like about multi-stage (there are a few things, but this one currently) is that the intermediary build steps are not named, pushed and associated to the final image. So that provenance is lost. If the tool doesn't include the git commit in a version variable or something, then the version used to build is lost. For debugging and maintaining audit info, it makes gaps. To that end buildah does include git commit, but runc does not.
@vbatts make sense… at some point we'll use packaged version so it won't matter anymore (and multi-stage might not even required anymore). In the meantime we could put some git
hash for those component somewhere in the produced image, it would fix it.
@vdemeester is it possible to export a variable from one layer/stage that could be set as a LABEL in the final image/stage?
@vbatts sadly nope :sweat: I was thinking more something like setting the git commit hash as args and use them instead of master
(pining a specific version).
How best to handle this? git log -1 --oneline > /.version.runc
and so on?
@vbatts or that :angel: it's even better :+1: I'll update with that :wink:
would it get copied forward as well?
@vbatts yeah I can make sure it's copied in the final image :angel:
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: arilivigni, ImJasonH, vdemeester
The full list of commands accepted by this bot can be found here.
The pull request process is described here
single nit LGTM
/lgtm
/hold
Fix vbatts' nit first
Done :tada: :man_dancing:
/hold cancel /lgtm
🕺
It makes the final image smaller, and allow better caching when building it. It also updates the
README.md
and sets a default builder image for buildah (vdemeester/buildah-builder
that is automatically build on the docker hub).Signed-off-by: Vincent Demeester vdemeest@redhat.com