Windows: expose the engine socket to other WSL distros (WSL integration)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, linux, rust
- Ambito
- backend-api-design, infrastructure
Direzione di ricerca
Start by reading the referenced docs/features.md section on TCP half-close and the existing kiri-start and kiri setup --docker-socket entry points. The report describes the desired mount, socket permissions, distro selection and optional Docker context, but does not identify implementation files or settle the settings and security design. Done would mean opt-in WSL distro integration survives shutdown and daemon restarts and supports the demonstrated Docker CLI and Compose workflows.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What you're trying to do
I develop inside my own WSL2 distro (NixOS; the same goes for Ubuntu and others), and I need the docker CLI and Compose there, with Linux paths for bind mounts.
On Windows, Kiri's Docker API can only be reached from Windows (npipe:////./pipe/kiri). The daemon serves /var/lib/kiri-daemon/.kiri/run/docker.sock inside the kiri distro only, and TCP is deliberately not offered (the half-close issue in docs/features.md), so another distro has no way to reach the engine. Running docker.exe through interop doesn't help, because bind mounts get Windows paths. This is what keeps me on Docker Desktop today.
What you'd like Kiri to do
Docker Desktop handles this with "WSL integration": you pick the distros in Settings, and each one gets the engine's socket.
All WSL2 distros share one kernel and the /mnt/wsl tmpfs, so a unix socket bind-mounted there is reachable from every distro, without touching the network. I tested this by hand:
# in the kiri distro, as root
mkdir -p /mnt/wsl/kiri
mount --bind /var/lib/kiri-daemon/.kiri/run /mnt/wsl/kiri
chgrp 1000 /mnt/wsl/kiri/docker.sock && chmod 660 /mnt/wsl/kiri/docker.sock # 1000 = docker group in my distro
# in another distro, as a regular user in that group
export DOCKER_HOST=unix:///mnt/wsl/kiri/docker.sock
docker run --rm alpine echo hello # prints hello
echo piped | docker run --rm -i alpine cat # prints piped (stdin + half-close work)
docker run -d --name from-nixos alpine sleep 3600 # shows up in Kiri's window and in `docker --context kiri ps` on Windows
Tested with Kiri 0.2.1 and docker CLI 29.9.2 on kernel 6.18.58.1-microsoft-standard-WSL2.
I can't make this stick myself: the mount is lost on wsl --shutdown, the kiri distro is managed by Kiri, and kiri-start recreates the socket, so its group and mode reset whenever the daemon restarts.
Proposal:
- Settings → "WSL integration": an opt-in list of the user's distros, off by default.
- When it's enabled,
kiri-startbinds the run dir to/mnt/wsl/kiri/, and the daemon creates the socket as0660with a fixed group. That's the same model as thekirigroup on Linux ("root-equivalent, exactly like the docker group"). - Optionally, in each enabled distro, create a
kiridocker context, or (opt-in) point/var/run/docker.sockat it, askiri setup --docker-socketdoes on macOS.
Security: the kiri distro stays as locked down as it is now (interop off). This opens no way into that distro beyond the Docker API. It does give container-level root to anyone in the socket's group in any distro of the same WSL VM. Docker Desktop's WSL integration draws the same trust boundary, which is why this should be opt-in.
Would you like to build it?
No, just suggesting it
- Lingua principale
- Rust
- Stelle
- 7.5k
- Fork
- 329
- Merge medio
- 7h 48m
- PR unite (30g)
- 105
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libracoder/kiri
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#364 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#289 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 47/100
libracoder/kiri#365 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
libracoder/kiri#362 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 47/100
libracoder/kiri#359 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di libracoder/kiri
Issue simili
-
benchmark-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
area:filesystem bug need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Captions panel does not offer to show an existing transcriptForse già presa @thedavidweng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CapSoftware/Cap#4276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matrix-org/matrix-rust-sdk#7495 ·
I maintainer di solito rispondono entro 1 giorno