Skip to content

[build]: add buildkit ssh forwarding support#76

Open
saehejkang wants to merge 1 commit into
apple:mainfrom
saehejkang:ssh-agent-access-build-commands
Open

[build]: add buildkit ssh forwarding support#76
saehejkang wants to merge 1 commit into
apple:mainfrom
saehejkang:ssh-agent-access-build-commands

Conversation

@saehejkang
Copy link
Copy Markdown
Contributor

Relates to apple/container#1472

Add support for receiving SSH forwarding configuration through build metadata and converting it into the buildkit ssh agent configuration.

@saehejkang saehejkang force-pushed the ssh-agent-access-build-commands branch from b25cda7 to 74fe216 Compare May 6, 2026 03:27
Comment thread pkg/build/buildopts.go
id, path, hasPath := strings.Cut(value, "=")
id = strings.TrimSpace(id)
path = strings.TrimSpace(path)
if !hasPath && strings.HasPrefix(id, "/") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is this for? Does docker support docker build --ssh /path/to/sock?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It handles any case in which there is no = and it starts with /. This would be converted to id=default, path=/path/to/sock (interpreted as a socket path). I believe docker does support this, but I found online that using the explicit form of default=/path/to/sock is more clear for use cases.

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