Closed bfirsh closed 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
.
Using Linux containers on Windows. Yeah, that's epic.
@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.
@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.
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.)
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?
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?
Would a cygwin version be workable? I used cygwin on windows and it's awesome.
@ahmetalpbalkan will you be involved in this, too? Being able to docker-compose on windows would be awesome!
@tknerr happy to help! We have quite some Windows porting knowledge we can transfer from docker, boot2docker-cli, docker-machine. :smile:
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.
:+1: same for me, would be happy to help testing docker-compose on windows too
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 ?
+1 for that
Docker client since 1.6.0 runs perfectly on windows without cygwin, and docker-compose should too imho
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.....
+1
+1
+1
+1
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.
I run these commands directly in the boot2docker VM - so once installed you need to log into the VM to access docker-compose.
Yes, my project code is on my host, I use the VirtualBox shared folders functionality.
+1 on this epic.
+1 on this epic.
+1
In the hope this saves others many hours of trying to figure out workarounds in the meantime:
alias docker-compose="docker run ..."
technique.ImportError: No module named fcntl
(d11wtq/dockerpty#7).SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:585)
. _(Edit: appears to be a bug with Python 2.7.9 and openssl v1.0.2, #1484 - downgrading to 1.0.1 using the package archive here fixes the problem.)_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... :-)
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 ,
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?
@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?
absolutely +1!
Updated the description with latest developments of running Compose in a container. https://github.com/docker/compose/pull/1806 Thanks @dnephin!
@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.
@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. :)
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.
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).
@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
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/
Would it work w/Kitematic?
PR #1900 get's docker-compose working on windows. I've been using it tonight.
+1
I would love this feature +1
+1
+1 Actually need this feature very much!
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.
See https://github.com/docker/compose/pull/1957 for my progress on building a Windows binary.
+1
+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.
+1
+1
pip install git+git://github.com/docker/compose.git
Works for me on Windows 7.
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:
/Users
to be mounted in the right place so volumes work. I wonder if we need something added to Machine/boot2docker to make volumes work as expected on Windows. (The Compose quick start guide has a demonstration of how volumes are used to mount code inside a container.)Steps:
Related issues: