Skip to content

Instantly share code, notes, and snippets.

Last active January 22, 2021 15:44
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Ubuntu for Windows: Setup Docker for WSL
# install docker client
curl > ~/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 > ~/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:// ; export DOCKER_HOST" >> ~/.bashrc
source ~/.bashrc
# test clients
docker --version
docker-compose --version
Copy link

sgtoj commented Oct 5, 2017

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...

Expose TCP in Docker Settings

Copy link

sgtoj commented 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