Skip to content

Install Sonobuoy in Dockerfile#1100

Open
gerbsen wants to merge 3 commits intomainfrom
gerbsen-patch-2
Open

Install Sonobuoy in Dockerfile#1100
gerbsen wants to merge 3 commits intomainfrom
gerbsen-patch-2

Conversation

@gerbsen
Copy link
Contributor

@gerbsen gerbsen commented Feb 17, 2026

Add Sonobuoy installation to Dockerfile with architecture support.

Add Sonobuoy installation to Dockerfile with architecture support.

Signed-off-by: gerbsen <1186245+gerbsen@users.noreply.github.com>
Copy link
Contributor

@mbuechse mbuechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@garloff
Copy link
Member

garloff commented Feb 20, 2026

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?

Are you objecting to building a one-size-fits-all container? What is your proposal? Two containers, one for IaaS and one for KaaS?
Currently, I think the size of the container is not yet exploding, so we can do the all-in-one for now, IMVHO.
The mount approach complicates things -- is that worth it?

@garloff
Copy link
Member

garloff commented Feb 20, 2026

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?

If things can be simplified, we should do that.

@gerbsen
Copy link
Contributor Author

gerbsen commented Feb 20, 2026

Are you objecting to building a one-size-fits-all container? What is your proposal? Two containers, one for IaaS and one for KaaS?
Currently, I think the size of the container is not yet exploding, so we can do the all-in-one for now, IMVHO.
The mount approach complicates things -- is that worth it?

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.

@gerbsen
Copy link
Contributor Author

gerbsen commented Feb 20, 2026

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants