Run docker in (WSL)Windows Subsystem Linux of Win10

  1. Install docker in WSL (ref: posts"Quick start to install Docker and Docker-compose on CentOS")

  2. Open "Expose daemon on tcp://localhost:2375 without TLS" within "Win10 Docker Desktop"

  3. Run and get into `bash` of WSL.

  4. Run command, and change the docker host to your Win10 via TCP:

vi ~/.bashrc 

=== .bashrc ===
export DOCKER_HOST='tcp://0.0.0.0:2375'
source ~/.bashrc

Ref: https://stackoverflow.com/a/48501091/3634867

Be the first to comment

Leave a Reply

Your email address will not be published.


*