ansible-community / ansible-bender

ansible-playbook + buildah = a sweet container image
https://ansible-community.github.io/ansible-bender/build/html/
MIT License
678 stars 74 forks source link

add --timestamp option for build sub-command #237

Open gzm55 opened 3 years ago

gzm55 commented 3 years ago

For producing deterministic image, we need pass a timestamp to buildah commit command. This timestamp should be passed from ansible-bender build ... or via the playbook variables. For building a squashed image in ci, we could use the commit timestamp as the value of this option.

TomasTomecek commented 3 years ago

Hi, thanks for opening this issue. This is the first time I learnt about buildah commit --timestamp.

I'm wondering if the value should be auto-populated by default and configurable. What would be your preference?

gzm55 commented 3 years ago

if do not pass timestamp to buildah commit, it is auto-populated by buildah. So the new optional argument (as cli parameter of yaml parameter) can be easily transmitted to the underlying container engine.

TomasTomecek commented 3 years ago

oki, understood

I'll try to implement passing that argument then