I know that this is not a direct answer to this question, but for everyone who comes across this question who uses WSL with Docker for Windows and cmder or conemu.
The trick is not to use Docker, which is installed on Windows at / mnt / c / Program Files / Docker / Docker / resources / bin / docker.exe, but to install Docker for Ubuntu / Linux. It is worth noting that you cannot start Docker itself from WSL, but you can connect to Docker for windows from the Linux Linux client.
Install Docker on Linux
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install docker-ce
Connect to Docker for Windows through port 2375, which must be enabled in the settings in Docker for Windows.
docker -H localhost:2375 run -it -v/mnt/c/code: /var/app -w "/var/app" centos:7
Or set the docker_host variable, which allows you to omit the -H switch
export DOCKER_HOST=tcp://localhost:2375
You should now be able to interactively connect to the tty terminal session.
Damo Feb 26 '19 at 10:20 2019-02-26 10:20
source share