/docker-wsl-proxy

🚢 docker-wsl-proxy allows connecting from Windows to Docker running in WSL2

Primary LanguageGoApache License 2.0Apache-2.0

docker-wsl-proxy

Build Status Download

This repo is deprecated. docker-wsl-proxy was a helper binary for Stevedore WSL2 support. Other tools like Rancher Desktop have their own similar implementations.

Overview

docker-wsl-proxy allows connecting from Windows to Docker running in WSL2.

There are several important aspects of this task:

  • Tunnelling Docker API calls into WSL2

  • Conversion of Windows paths to their WSL equivalents

Usage

  1. Install socat in WSL2

  2. Run dockerd inside WSL2

  3. Run docker-wsl-proxy.exe -c wsl://<wsl distribution name>/var/run/docker.sock

  4. Run Docker commands on Windows host

Building from source

  1. Install Go

  2. Clone docker-wsl-proxy Git repository

  3. Run go build in repository root

  4. Now you have ready-to-use docker-wsl-proxy.exe

You can also use go run docker-wsl-proxy.go to build & run in one step.