Repository navigation
Conversation
There was a problem hiding this comment.
Is there a way that this value can be wrong on some hosts? I'm not an expert in ssh but is it possible that the socket's path is different?
There was a problem hiding this comment.
this is a socket that we mount in the shim, it will always be present at this given path. However, this implementation does not seem to work 🤣 I rebased with something better
- Solves: dagger#3581 - Forwards `SSH_AUTH_SOCK` to forwards `ssh-agent` connection Signed-off-by: Guillaume de Rouville <[email protected]>
|
[this is just my opinion, @vito to decide] I think we could fix this AND #3712 (docker socket) in one shot. Suggestion:
Example:
Bikeshedding:
/cc @shykes |
|
IMO before we merge this, we need to lock down the API design for a broader set of features, even if we don't implement all those features right away. At the very least we should make sure we use the lessons from the 0.2 API design (both the good and the bad). Some features that we should design before implementing any of them:
Again: we don't need to implement all these features now (or even soon), but we should discuss the API design for them as a whole. |
|
@shykes following your comment, not sure about the next actionable step?
This feature might unlock very painful use-cases -> impossible to |
|
Ping: one of our power user just requested this feature -> https://discord.com/channels/707636530424053791/1040217609750188032/1040217609750188032 |
Yeah, and we also kinda need this to be able to run full tests using dagger (to test dagger provisioning in dagger, we need the executed container to be able to launch a new engine). /cc @sipsma
That's pretty hard. I'll take a stab at it (very incomplete)
2 parts:
c.Host().UnixSocket(path string) *dagger.Socket
c.Host().TCPSocket(port int) *dagger.Socket
c.Host().UDPSocket(port int) *dagger.Socketcontainer.WithUnixSocket(path string, socket *dagger.Socket)
container.WithTCPSocket(port int, socket *dagger.Socket)
container.WithUDPSocket(port int, socket *dagger.Socket)Usage: container.WithUnixSocket("/var/run/docker.sock", c.Host().UnixSocket("/var/run/docker.sock"))Under the hood, it's all unix sockets (because it's all we have from buildkit:
Does this make sense for anything but services? Regular Execs are:
In that case, mirror the c.Container().WithTCPSocket(8080, myService.TCPSocket(8080))I know @vito did a lot of this with bass. There's a lot of considerations to take into account, especially around not busting the cache.
Same question as above -- does it make sense for non-services? I think not, for the same reasons. However, even if limited to services, the tricky part here is how are ports exposed to the host?
|
|
When this PR merges, we need to alert this user -https://discord.com/channels/707636530424053791/1042013918756868126 |
|
@aluzzardi @grouville I opened an issue to unblock us: #3850 |
|
I propose closing this, and continuing all discussion in #3850 for easier discoverability. |
Creates a
withMountedSSHAPI tocore.Containerssh-agentto build and run core operations #3581SSH_AUTH_SOCKto forwardsssh-agentconnectionBoth
core.Buildandcore.Execmight benefit from itTests are on the way
wdyt @vito ?
TODO: add tests + go generate
Signed-off-by: Guillaume de Rouville