jesseduffield / jesseduffield/lazydocker

Can't connect to Docker on WSL via ssh from Windows

Open
#770 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Can't connect to Docker via ssh from Windows machine due to the hardcoded uri "/tmp" (https://github.com/jesseduffield/lazydocker/blob/577797d9ed11463f220c0c5d0acb86b521c1d21d/pkg/commands/ssh/ssh.go#L89)

**To Reproduce**
Steps to reproduce the behavior:
1. Go to WSL, start ssh server
2. Add ssh key to ~/.ssh/authorized_keys
3. Check WSL hostname and create a context in Windows: `docker context create wsl --docker "host=ssh://@"`
4. Enable the context: `docker context use wsl`
5. Try to run lazydocker from Windows

**Expected behaviour**

You will receive an error on master 577797d9ed11463f220c0c5d0acb86b521c1d21d:
`2026/03/04 14:33:43 tunnel ssh docker host: create ssh tunnel tmp file: GetFileAttributesEx /tmp: The system cannot find the file specified.`

You will receive an error on version 0.23.3 (windows:amd64):
`2026/03/04 14:46:57 tunnel ssh docker host: create ssh tunnel tmp file: CreateFile /tmp: The system cannot find the file specified.`
This version works only if you set the DOCKER_HOST variable `ssh://@`. It won't work with the context (it would try to connect through http).

**Desktop (please complete the following information):**
- OS: Windows + WSL
- Lazydocker Version 0.23.3 and master 577797d9ed11463f220c0c5d0acb86b521c1d21d

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.