Skip to content

shim for docker.exe and docker-compose.exe that actually call docker binary in wsl, with basic path translation

Notifications You must be signed in to change notification settings

trakos/docker-wsl-shim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a very simple shim for docker.exe and docker-compose.exe that allows using docker in wsl without Docker Desktop.

Manually install docker in WSL2, make sure it works inside the linux system, and then you can use this commands in windows as if docker was running with Docker for Desktop.

This command uses only default WSL instance. To change that, simply assign desired name to defaultDistro.

It should take care of path substitutions, e. g. changing

  • \\wsl$\system-name\var\opt to /var/opt (ony if system-name is the defaultDistro)
  • C:/Users/username/Desktop to /mnt/c/Users/username/Desktop. It cals wsl wslpath to do this

Build:

go.exe build -o out\docker.exe docker.go helper.go
go.exe build -o out\docker-compose.exe docker-compose.go helper.go

About

shim for docker.exe and docker-compose.exe that actually call docker binary in wsl, with basic path translation

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages