-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing docker from bash under windows subsystem for linux #1480
Comments
Hi @sohailalam2 |
You will need to check "Expose daemon on tcp://localhost:2375" in Docker for Windows configuration, and get Docker client (only the client is needed): curl -sSL https://download.docker.com/linux/static/stable/x86_64/docker-17.09.1-ce.tgz | sudo tar -C /usr/local/bin -xz --strip=1 docker/docker
export DOCKER_HOST=tcp://localhost:2375
docker version Alternatively (from Windows 10 Anniversary Update build 14951 and later) you could just point WSL to the Windows client (no need to "Expose daemon …", Windows client uses named pipe) |
Thanks @jasonbivins this did the trick for me too :) |
Note that I tried using Is there any way one could use a Docker Compose file to bring up an environment within Ubuntu/WSL, or do I have to switch back over to PowerShell so Docker Compose can pick up the compose file? |
Something with my Docker install must've been messed up; I went into settings and reset Docker to factory defaults, and now it seems to be working whether using docker-compose.exe in WSL or docker-compose in PowerShell. |
This solved it for me: |
Tried the above, docker-compose still complains that it can't find the config file. |
I also tried the above and at first it didn't work. I restarted Windows and Docker and now it's working fine. |
Looks like this issues is resolved so I'm closing it. In general, we don't support running the docker CLI in WSL against Docker for Windows as WSL is still under heavy development. It may work with recent versions (as some of you reported) but we don't test this configuration. |
And how to "reload the environment"? |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
Windows subsystem for linux allows us to run bash shell.
Docker should be accessible from this shell also (as we are able to do it from windows command prompt).
Actual behavior
Information
Steps to reproduce the behavior
docker -v
in ubuntu bash shellThe text was updated successfully, but these errors were encountered: