docker / compose

Define and run multi-container applications with Docker
https://docs.docker.com/compose/
Apache License 2.0
33.88k stars 5.21k forks source link

Epic: Windows support #1085

Closed bfirsh closed 9 years ago

bfirsh commented 9 years ago

This is a meta-issue for keeping track of all the things we're doing around Windows support for Compose.

Various things that are part of this:

Steps:

Related issues:

mikehaertl commented 9 years ago

So you talk about a native Windows version of docker-compose here?

As there isn't even a docker version for windows yet, I wonder if it wouldn't make more sense to focus on including docker-compose into the boot2docker VM for now:

https://github.com/boot2docker/boot2docker/issues/603

This is something that blocks many developers on Windows machines. And even though there are workarounds, I'd consider them hacks. Windows users should not have such a hard time to work with docker-compose.

funkyfuture commented 9 years ago

Using Linux containers on Windows. Yeah, that's epic.

dduportal commented 9 years ago

@mikehaertl The docker client is not a requirement for docker-compose (which embed its own python-written client). For example, we use https://github.com/rhuss/docker-maven-plugin in my companyy, which can contact our boot2docker, but running a JVM process in Windows.

So there are two main use cases :

=> In the two cases, compiling and running is just some plumbing. The main goal will be making that usable. The real tecnical problem is the data sharing.

bfirsh commented 9 years ago

@mikehaertl Windows support is being added to the Docker client. https://github.com/docker/docker/pull/9113 https://github.com/docker/docker/pull/10864

Happy to accept changes which make Compose work inside boot2docker, but I think the ideal situation would be for Docker to run on Windows natively.

funkyfuture commented 9 years ago

now seriously, i see a lot of issues open for a long time. from my experience, adding and maintaining Windows-support is a real time-eater and will constantly bring up issues. I'm not opposing Windows-support at all, but i'd say that should be done when few issues are on the backlog. especially functional enhancements.

and on the other hand i'm still irritated what that whole Docker on Windows-thing is actually aiming at. just to claim cross-platform-support? save Microsoft from getting irrelevant on servers? (yep, that's ot, no need to discuss it here.)

kuborgh-mspindelhirn commented 9 years ago

We use docker partilly for development machine setup and Windows support would be really cool.

I don´t really think this is a supprise as docker-machine and docker ( windows client is buildable since the start of the year ) support windows. Is there any reason that docker-compose should not?

atrauzzi commented 9 years ago

Slightly related perhaps: https://windows.uservoice.com/forums/265757-windows-feature-suggestions/suggestions/6573649-full-posix-support

Would having proper POSIX support like on OSX help? As a community, maybe it's worthwhile to at least help drive that message?

kskalvar commented 9 years ago

Would a cygwin version be workable? I used cygwin on windows and it's awesome.

tknerr commented 9 years ago

@ahmetalpbalkan will you be involved in this, too? Being able to docker-compose on windows would be awesome!

ahmetb commented 9 years ago

@tknerr happy to help! We have quite some Windows porting knowledge we can transfer from docker, boot2docker-cli, docker-machine. :smile:

objarni commented 9 years ago

I'd be happy to test any docker-compose binary or workaround script in a Windows 7 environment as the tricky nature of installing it stopped me today. I tried these methods, both failed: 1) clone and build docker-image myself as per stackoverflow answer here: http://stackoverflow.com/a/29728993 2) "pip install docker-compose" (got Py2.7 installed on machine). I'm using boot2docker, installed by official Windows installer.

tknerr commented 9 years ago

:+1: same for me, would be happy to help testing docker-compose on windows too

ereOn commented 9 years ago

I don't know if it was considered, but please don't enforce the use of cygwin on Windows.

Also regarding the generation of binaries on Windows, wouldn't entry points be good-enough solution ?

tknerr commented 9 years ago

+1 for that

Docker client since 1.6.0 runs perfectly on windows without cygwin, and docker-compose should too imho

kskalvar commented 9 years ago

I could use the docker image to run docker-compose on windoze but for some reason it complains it can't find the *.yml file.....

dacay commented 9 years ago

+1

inaffect-ag commented 9 years ago

+1

qxo commented 9 years ago

+1

stagas commented 9 years ago

+1

willylambert commented 9 years ago

If it can help, I successfully install and run docker-compose with boot2docker under Windows through the following commands which use the python package manager pip:

wget -P /tmp/ http://www.tinycorelinux.net/5.x/x86/tcz/python.tcz && tce-load -i /tmp/python.tcz && rm -f /tmp/python.tcz
curl -LO -k https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py && sudo /usr/local/bin/python2.7 ez_setup.py && rm -f ez_setup.py
sudo /usr/local/bin/easy_install-2.7 pip
sudo /usr/local/bin/pip2.7 install -U docker-compose==1.2.0

The only drawback is the need to install again docker-compose after each restart of the boot2docker VM.

willylambert commented 9 years ago

I run these commands directly in the boot2docker VM - so once installed you need to log into the VM to access docker-compose.

willylambert commented 9 years ago

Yes, my project code is on my host, I use the VirtualBox shared folders functionality.

secat commented 9 years ago

+1 on this epic.

secat commented 9 years ago

+1 on this epic.

pbearne commented 9 years ago

+1

edmorley commented 9 years ago

In the hope this saves others many hours of trying to figure out workarounds in the meantime:

As such for now, I'd advise Windows users to stick to installing the docker-compose Python package inside boot2docker, rather than the alternatives [1].

This is pretty painless - and can be made to persist after boot2docker restarts - see: https://github.com/boot2docker/boot2docker/issues/603#issuecomment-110033929

[1] unless you likewise have a fondness for yak shaving. All I wanted to do was fix one bug in another team's project, then ended up learning Docker/Docker Compose to try and overhaul their development environment - and now... :-)

dduportal commented 9 years ago

Hello ! As said here : https://github.com/boot2docker/boot2docker/issues/603#issuecomment-111816296 you have a resume on the things around inside boot2docker.

Windows part need python compilation/packaging natively to run remote (or statically go rewrite) + docker new volumes system well running to ensure filesystem coherency ,

phazei commented 9 years ago

Running it non-native is kind of annoying, sure it could be run in boot2docker, but clearly that's not good enough or it wouldn't have been necessary to create the native docker.exe client.

Since docker-compose is python, and it's not doing anything incredibly specific, it should just run in windows under python, but it relies on the fcntl package for what I presume is file locking of some sort. Wouldn't an alternative method for file locking simply fix the issue? Seems they came across the same issue and came up with some windows-friendly locking with this here Edit: better link Could a similar implementation be used?

matthewr6 commented 9 years ago

@phazei It also requires termios (found out after you put a workaround in such as the mentioned, or this)

@edmorley Would that method work with Kitematic Windows' alpha?

wklm commented 9 years ago

absolutely +1!

bfirsh commented 9 years ago

Updated the description with latest developments of running Compose in a container. https://github.com/docker/compose/pull/1806 Thanks @dnephin!

ahmetb commented 9 years ago

@bfirsh libcompose should be helping a great deal delivering Compose for Windows, right? I don't see the point of running it inside a container if we will have a Go binary for it.

bfirsh commented 9 years ago

@ahmetalpbalkan Anything powered by libcompose is still a long way out.

If there's anything we can get Compose working with Windows in a short-term, then that's a win. :)

nathanleclaire commented 9 years ago

FYI the Virtualbox Shared Folders hack happens in virtualbox machines created with docker-machine in Windows today. The C:\Users directory is mounted at /c/users/ in the boot2docker VM IIRC.

This is largely problematic with the Docker CLI / msysgit (because there's a "translation layer" which attempts to munge Unix-style paths to Windows paths in msysgit), but might be something Compose can work around since it is sending information directly to the Docker API.

friism commented 9 years ago

I don't think the virtualbox shared folder approach can be counted on. This is because the virtualbox mapping of filesystem semantics from Windows to Linux is too imperfect (I think the particular problem I found was that something in bundle install used symlinks for something, and that didn't map out to the windows shared folder correctly).

koushikckm commented 9 years ago

@willylambert This is not working on docker curl -LO -k "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py" && sudo /usr/local/bin/python2.7 ez_setup.py && rm -f ez_setup.py says rning: Failed to create the file ez_setup.py: Permission denied

bpuglisi commented 9 years ago

I recently developed a nice series of steps for getting Docker Compose and Docker Machine working with my Windows 10 setup. Hope this helps!

http://brianpuglisi.com/how-to-get-docker-compose-working-on-windows-10/

matthewr6 commented 9 years ago

Would it work w/Kitematic?

dopry commented 9 years ago

PR #1900 get's docker-compose working on windows. I've been using it tonight.

sirinath commented 9 years ago

+1

alexandarp commented 9 years ago

I would love this feature +1

bill2004158 commented 9 years ago

+1

christianhuening commented 9 years ago

+1 Actually need this feature very much!

dopry commented 9 years ago

Feel free to

pip install --upgrade git+https://github.com/dopry/compose.git@windows

or better yet check out https://github.com/docker/libcompose the libcompose cli works on windows as well, and has equivalent functionality and is written in go like the rest of the docker tooling suite.

aanand commented 9 years ago

See https://github.com/docker/compose/pull/1957 for my progress on building a Windows binary.

lifenautjoe commented 9 years ago

+1

koushikckm commented 9 years ago

+1. cool stuff. I work on docker on windows 8. It works well but after certain period it runs out of memory and crashes.

On Sun, Sep 6, 2015 at 4:55 PM, Joel Hernández notifications@github.com wrote:

+1

— Reply to this email directly or view it on GitHub https://github.com/docker/compose/issues/1085#issuecomment-138073237.

divyakumarjain commented 9 years ago

+1

wreiske commented 9 years ago

+1

shantanuthatte commented 9 years ago

image

pip install git+git://github.com/docker/compose.git

Works for me on Windows 7.