Skip to content

Install Sonobuoy in Dockerfile#1100

Merged
gerbsen merged 1 commit intomainfrom
gerbsen-patch-2
Mar 5, 2026
Merged

Install Sonobuoy in Dockerfile#1100
gerbsen merged 1 commit intomainfrom
gerbsen-patch-2

Conversation

@gerbsen
Copy link
Contributor

@gerbsen gerbsen commented Feb 17, 2026

Add Sonobuoy installation to Dockerfile with architecture support.

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?

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.

Approving under the assumption that it's been tested. My opinion about Docker hasn't changed, but I see myself outvoted, and that is fine.

@gerbsen
Copy link
Contributor Author

gerbsen commented Mar 4, 2026

@garloff Could you try to build/test this on your side?

@fkr
Copy link
Member

fkr commented Mar 4, 2026

While looking at this (and wanting to test the build on github), I found out that our workflow on github was broken by
r119557e - this PR fixes it. Once that is merged, we can rebase this PR and also test the build on github.

#1130

Add Sonobuoy installation to Dockerfile with multi-architecture support.

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

Use default build variables from docker
@fkr fkr force-pushed the gerbsen-patch-2 branch from be8a193 to 990d926 Compare March 4, 2026 20:38
@fkr
Copy link
Member

fkr commented Mar 4, 2026

@gerbsen @mbuechse the github action for the docker build at least succeeds:

https://github.com/SovereignCloudStack/standards/actions/runs/22688276923/job/65776939473

@gerbsen gerbsen merged commit 8c109ba into main Mar 5, 2026
10 checks passed
@gerbsen gerbsen deleted the gerbsen-patch-2 branch March 5, 2026 09:06
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.

4 participants