Conversation
Add Sonobuoy installation to Dockerfile with architecture support. Signed-off-by: gerbsen <1186245+gerbsen@users.noreply.github.com>
mbuechse
left a comment
There was a problem hiding this comment.
To be frank, I do hate this Dockerfile. It tries to install all dependencies, that is, for IaaS and KaaS alike, regardless of the eventual purpose. Would it be possible to supply sonobuoy via a mount? Otherwise, maybe the code can at least be shortened. With Ansible, we only need these lines (with curl):
- name: Install Sonobuoy
ansible.builtin.shell:
curl -L {{ sonobuoy_tar_gz_url | trim | quote }} | tar xz sonobuoy
args:
chdir: "{{ ansible_user_dir}}/.local/bin/"
creates: sonobuoy
when: kaas | bool
Apparently, when curl can be used, there is no need to have three separate commands for downloading, extracting and removing a temporary file, and even the chmod seems to be unnecessary? Not sure if curl is available on a python-3.10 image (or whatever is used here), but I think it's worth a try.
Are you objecting to building a one-size-fits-all container? What is your proposal? Two containers, one for IaaS and one for KaaS? |
If things can be simplified, we should do that. |
I would also be against splitting it into multiple images. Currently, the Dockerfile is pretty straightforward, and even the sonobouy installation changes very little. Mounting an external binary into the image destroys, in my opinion, the point of multi-arch Docker images, which work “just like that” everywhere. Thanks to the default build(x) parameters that I have now inserted, the image should even build for Windows. |
|
I don't quite understand the GitHub checks stuff. Do you build the image with the CI? If I understand this correctly the image is only build once it's merged in main? Shouldn't this be also part if the branch/PR pipeline? |
Add Sonobuoy installation to Dockerfile with architecture support.