Skip to content
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

Proposal: Create apt install package specifically for WSL use-case #32238

Closed
kayakyakr opened this issue Mar 30, 2017 · 18 comments
Closed

Proposal: Create apt install package specifically for WSL use-case #32238

kayakyakr opened this issue Mar 30, 2017 · 18 comments

Comments

@kayakyakr
Copy link

Docker for Windows and Windows Subsystem for Linux combos wonderfully: the docker daemon lives on windows while docker client in Ubuntu can easily connect to the daemon and any containers running can be used from linux-bound applications. It creates almost an ideal dev environment.

The one gotcha is that it was a bit more difficult to set up since the Ubuntu under WSL does not require the docker daemon (and in fact, cannot run it at all). This causes dire warnings when, in fact, it's worked just fine. I don't believe that the setup even requires $DOCKER_HOST to point to tcp://0.0.0.0:2375 as tcp://127.0.0.1:2375 seems to also work just fine.

If the packages installed were limited to docker-compose + the docker client without any daemon setup, it would make things much simpler.

@thaJeztah
Copy link
Member

looks like a duplicate of #15360

@kayakyakr
Copy link
Author

Looks like that became this suggestion over the course of discussion.

@atrauzzi
Copy link

atrauzzi commented Apr 7, 2017

Would very much like to see this happen.

@thaJeztah
Copy link
Member

ping @friism @andrewhsu

@friism
Copy link
Contributor

friism commented Apr 7, 2017

Is there are way to create a package separate from normal Ubuntu and specific to Windows Subsystem for Linux?

@kayakyakr
Copy link
Author

I don't believe there is. Under WSL, Ubuntu believes itself to be a full implementation and attempts to act as one.

I'm guessing the best approach will be to offer a different "collection" package such as docker-remote which installs the client and associated apps without installing the daemon and sets up an ENV for pointing to a remote server.

@thaJeztah
Copy link
Member

@friism that's why I linked #15360 - could be solved by having the client as a separate package

@wclr
Copy link

wclr commented Jun 27, 2017

I'm currently struggling to understand what is a correct way to get docker/docker-compose clients work in Windows Subsystem for Linux.

In the latest WSL release (windows creators update) instructions given in https://docs.docker.com/engine/installation/linux/ubuntu/ do not work (in previous releases it kind of worked)

Though I can install using:
$ add-apt-repository universe
$ apt-get install docker.io

But it installs version Docker version 1.10.3, build 20f81dd I believe it is kind of old? So how one should deal with it?

@atrauzzi
Copy link

One difference worth noting is how paths are mapped during bind mounts. The filesystem in WSL is /mnt/c/...

Not sure if that requires special handling or configuration when calling the docker command.

@friism
Copy link
Contributor

friism commented Jun 27, 2017

@whitecolor why can't you just invoke the Windows Docker binaries from WSL? https://msdn.microsoft.com/en-us/commandline/wsl/interop

@wclr
Copy link

wclr commented Jun 27, 2017

@friism yes I'm already testing it
docker.exe from windows seems to work normal in WSL, but docker-compose should be installed on linux using instructions in https://github.com/docker/compose/releases

So potentially there still maybe probelms with running docker.exe. At least I see many cases of work of executables that are not acceptable.

@friism
Copy link
Contributor

friism commented Jun 27, 2017

docker-compose should be installed on linux

Why can't you just use docker-compose.exe? It's installed with Docker for Windows.

I see many cases of work of executables that are not acceptable.

Let us know what's not working so we can figure out what's wrong.

@wclr
Copy link

wclr commented Jun 27, 2017

It doesn't work well
image

@thaJeztah
Copy link
Member

At this moment, I think the easiest way to obtain the docker client, is to download the static package (.tgz); https://download.docker.com/linux/static/, extract it, and use the docker binary from that (that binary is the docker cli). For example, to install docker 17.03.1-ce;

$ curl -o docker-ce.tgz -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-17.03.1-ce.tgz
$ tar -xvzf docker-ce.tgz
docker/
docker/docker-containerd-ctr
docker/docker-proxy
docker/docker
docker/docker-containerd
docker/dockerd
docker/docker-init
docker/docker-containerd-shim
docker/docker-runc

$ mv docker/docker /usr/bin

$ docker --version
Docker version 17.03.1-ce, build c6d412e

Docker Compose can be installed using the instructions on the releases page on GitHub; https://github.com/docker/compose/releases

@wclr
Copy link

wclr commented Jun 27, 2017

One difference worth noting is how paths are mapped during bind mounts. The filesystem in WSL is /mnt/c/...

BTW for docker-compose to work in WSL it is need to make a symlinks inside MobyLinux VM. I've created the issue about it long ago docker/for-win#371

@wclr
Copy link

wclr commented Jun 29, 2017

There is a problem with encoding of python based apps in windows outputting to linux console.
It seem that this can run docker-compose from windows fine
cmd.exe /c "chcp 850 >> nul && docker-compose $@"

@wclr
Copy link

wclr commented Jul 7, 2017

For the current moment conclusion about using windows binaries in WSL is following: for everything in my docker stack (docker, docker-compse, gcloud, kubectl) to work correctly I still have to use native linux versions, windows versions doesn't work in many cases.

@thaJeztah
Copy link
Member

Let me close this ticket for now, as it looks like it went stale.

@thaJeztah thaJeztah closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
@atrauzzi @friism @kayakyakr @wclr @thaJeztah @GordonTheTurtle and others