Skip to content

Add ssh parameter support for image builds#642

Open
sowmya-sl wants to merge 1 commit intocontainers:mainfrom
sowmya-sl:add-ssh-params
Open

Add ssh parameter support for image builds#642
sowmya-sl wants to merge 1 commit intocontainers:mainfrom
sowmya-sl:add-ssh-params

Conversation

@sowmya-sl
Copy link
Copy Markdown

Allow passing SSH agent sockets or keys to the build API, similar to the existing secrets parameter support.
Fixes: #602

@inknos
Copy link
Copy Markdown
Contributor

inknos commented Apr 8, 2026

@sowmya-sl thanks for the PR, please sign your commit as DCO bot says

Allow passing SSH agent sockets or keys to the build API,
similar to the existing secrets parameter support.

Signed-off-by: sowmya-sl <[email protected]>
@inknos
Copy link
Copy Markdown
Contributor

inknos commented Apr 10, 2026

/packit retest-failed

Copy link
Copy Markdown
Contributor

@inknos inknos left a comment

Choose a reason for hiding this comment

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

Apologies for the noise. I think the PR looks good but something might be missing on Podman's side and an issue could be filed to add ssh parameter there too. I'll investigate that while tests run

@sowmya-sl
Copy link
Copy Markdown
Author

sowmya-sl commented Apr 10, 2026

@inknos Let me know if anything needs to be added from the server side.

@sowmya-sl
Copy link
Copy Markdown
Author

/packit retest-failed

manifest (str) - add the image to the specified manifest list.
Creates manifest list if it does not exist.
secrets (list[str]) - Secret files/envs to expose to the build
ssh (list[str]) - SSH agent socket or keys to expose to the build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would add an example of how content should look, or refer that content should look like podman build --ssh.

params["secrets"] = json.dumps(kwargs.get("secrets"))

if "ssh" in kwargs:
params["ssh"] = json.dumps(kwargs.get("ssh"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Non-blocking: What if kwargs.get("ssh") returns an empty array?

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.

[Bug] Pass --ssh option when building an image

3 participants