You must be signed in to star a gist
Ubuntu for Windows: Setup Docker for WSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|# install docker client|
|curl https://download.docker.com/linux/static/stable/x86_64/docker-19.03.8.tgz > ~/docker.tar.gz|
|tar xzvf ~/docker.tar.gz --directory ~/|
|sudo mv ~/docker/docker /usr/local/bin/docker|
|rm -rf ~/docker|
|rm -f ~/docker.tar.gz|
|# install docker-compose client|
|curl -L https://github.com/docker/compose/releases/download/1.28.0/docker-compose-Linux-x86_64 > ~/docker-compose|
|chmod +x ~/docker-compose|
|sudo mv ~/docker-compose /usr/local/bin/docker-compose|
|# point client to docker engine running in windows|
|echo "DOCKER_HOST=tcp://127.0.0.1:2375 ; export DOCKER_HOST" >> ~/.bashrc|
|# test clients|
Nov 3, 2020
This is no longer needed with latest version of docker for windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Native Docker (i.e. Docker Engine) is not compatible with WSL. However, The Docker client and Docker Compose (v1.17.1) client can be installed and configured connect to Docker for Windows. To do so, install Docker for Windows then follow the instructions then close all BASH instances and relaunch.
After installing the client, expose the TCP port in the Docker for Windows setting. See screenshot...