Repository navigation
support mounting host Unix sockets into containers - #4025
Conversation
d5e1d1e to
b29863c
Compare
Signed-off-by: Alex Suraci <[email protected]>
sipsma
left a comment
There was a problem hiding this comment.
minor comments, looks great!
untested Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
There was a problem hiding this comment.
This shouldn't be needed since it's not being used in the tests bellow.
There was a problem hiding this comment.
👍 will remove, I was just pattern matching here :)
this test is incredibly complicated, and required adding support for configurable SSH known hosts, but now we can trust this feature to work. Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
|
@sipsma ready for another look! |
|
|
||
| target = absPath(payload.Config.WorkingDir, target) | ||
|
|
||
| payload.Sockets = append(payload.Sockets, ContainerSocket{ |
There was a problem hiding this comment.
This is a dumb corner case but I guess if you put multiple socks at the same location the behavior is probably weird: either buildkit returns an error but only when you try to do an exec and/or the without behavior removes the "lower" socket rather than the upper.
Probably better to fail if the user tries to do that. Not a blocker though.
There was a problem hiding this comment.
Good point, pushed a tweak so WithUnixSocket will replace an existing socket with the same path, rather than blindly appending.
| require.Contains(t, res.Git.Commit.Tree.File.Contents, "Dagger") | ||
| } | ||
|
|
||
| func TestGitSSHAuthSock(t *testing.T) { |
Signed-off-by: Alex Suraci <[email protected]>
fixes #3850
Implements the following schema:
The current approach is to call
llb.SSHIDwith the content-addressedSocketIDprefixed bysocket:to distinguish it from the current named sockets, making this backwards-compatible. The implementation is very similar to how the secret provider works (passing a FooID to the session.Attachable), but it's simpler for now since there's no container-to-network socket forwarding (yet?).