fix(ssh): use user name in DOCKER_HOST

This commit is contained in:
Cyan Joeng 2024-12-12 14:32:42 +00:00
parent be05115352
commit 0229084314

View file

@ -55,7 +55,7 @@ func (self *SSHHandler) HandleSSHDockerHost() (io.Closer, error) {
// if the docker host scheme is "ssh", forward the docker socket before creating the client
if u.Scheme == "ssh" {
tunnel, err := self.createDockerHostTunnel(ctx, u.Host)
tunnel, err := self.createDockerHostTunnel(ctx, u.User.String() + "@" + u.Host)
if err != nil {
return noopCloser{}, fmt.Errorf("tunnel ssh docker host: %w", err)
}