-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Run on windows by bypassing dockerpty. #1900
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
Conversation
5cf2f05 to
3513fbf
Compare
|
it looks great! |
|
👏 |
|
Yes! |
|
I ran into an uncaught exception when the docker host environment variables weren't set and docker-compose tried to connect to the local unix socket. I added an error message to recommend users to docker-machine env --help. I currently have a fairly complex django environment running with postgres, redis, rabbitmq, django app, django celery worker and haproxy. I've tested scaling the workers and app containers successfully. links are working properly between containers in my compose environment. Everything seems to be working fine. I'm very happy to have compose on windows. |
|
What's the way to try this? Tried the following and got a an |
|
I am unable to reproduce the ImportError for Queue Both of the following work for me. |
|
Maybe I messed up my Python installations. I have pypy2 and python3. Are both supported? |
|
As far as i know python 3 is not officially supported in docker-composer. I'm testing on python 2.7. |
|
Thanks for this - I've been investigating Windows binaries for the past few days and have hit on the exact same problem. It would, however, be quite rubbish to release a binary that can't do an interactive |
|
To be honest I've never used docker-compose run. I use build, up, and On Tue, Aug 25, 2015 at 8:58 AM, Aanand Prasad notifications@github.com
Darrel O'Pry |
|
+1 for the comment above. |
|
Lots of people use |
|
well it doesn't run on windows at all right now, so technically you're not On Tue, Aug 25, 2015 at 1:01 PM, Aanand Prasad notifications@github.com
Darrel O'Pry |
|
I usually run docker-compose run when I'm starting my day. I run the On Tue, Aug 25, 2015 at 2:08 PM dopry notifications@github.com wrote:
|
|
So you're doing that on windows? On Tue, Aug 25, 2015 at 1:21 PM, Martín Coll notifications@github.com
Darrel O'Pry |
|
I'd love to do that. I SSH into the machine and use docker-compose from |
|
So why do you explicitly use docker-compose run over docker-compose up when On Tue, Aug 25, 2015 at 1:39 PM, Martín Coll notifications@github.com
Darrel O'Pry |
|
First, I have no idea how to use exec/attach. Now that that's clear, I use run because it spins up a couple of containers that I don't usually want to be running, all in one command. |
|
@tinchou, You can use docker compose up [service name] to start a subset of On Tue, Aug 25, 2015 at 1:56 PM, Martín Coll notifications@github.com
Darrel O'Pry |
Signed-off-by: Darrel O'Pry <darrel.opry@spry-group.com>
Signed-off-by: Darrel O'Pry <darrel.opry@spry-group.com>
|
|
@tinchou, all of those things work with docker-compose up [servicename]... docker compose run is actually meant to run commands on all the hosts implementing a service.. ie) you want to restart a service on all of them or some similar action. |
|
@aanand, how do I resolve ERROR: for 5 b'Conflict. The name "custom-container" is already in use by container b2dd5be30e09. You have to delete (or rename) that container to be able to reuse that name.' It looks like a problem in the test suite/build environment, not the PR itself. |
|
I've noticed that test "Test that calling scale on a service that has a custom container name" has been flaking a few times today against 1.8.1. I've created #1922 to investigate it further. I agree I don't think it's related to your branch. I'll start another run of this branch. |
|
@dnephin, still looks like an upstream build/ci issue. I give up. @aanand has already indicated the approach is rubbish... so I'll just go use https://github.com/rancher/rancher-compose instead, since they're not running around chasing their tails. |
|
I think this patch should have been accepted. This fixes a lot of things and does not ship a crappy experience at all. It enables >90% of the functionality for the Windows users (who have no other option today) and the terminal problems can be fixed over time. I don't think there's anything wrong with shipping For instance, the Windows port of Docker client was initially in a similar shape. We shipped something where the console/attach functionality didn't really work well but it still did a lot of things for the users. Literally nobody complained about it and everybody was so happy to use the Windows client to do docker build/run/ps/stop/start etc. We did this early on (around April 2015) and lots of people have been using it since then. I think we need maintainers' input here @aanand @bfirsh, please comment if you find this PR useful and acceptable at all. |
|
+1, docker-compose on Windows without run is better than nothing. |
|
+1 I think this is a good first step. |
|
+1 |
Adapted from @dopry's work in docker#1900 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Adapted from @dopry's work in docker#1900 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Adapted from @dopry's work in docker#1900 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Adapted from @dopry's work in docker#1900 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Adapted from @dopry's work in docker#1900 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Adapted from @dopry's work in docker#1900 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This is a proposal for a way to implement windows support for compose in the near term.
A primary blocker to support for running on windows in dockerpty's dependency on fcntl to lock the file descriptors for the pty streams. This is only used when docker-compose is ran in attached mode. This PR removes attached mode support on windows. The assumption is that you could simply use docker itself to attach to the containers as a windows user.
I have tested docker build, run, and up with some simple projects that do not use volumes and all seems to work as expected.
The caveat here being that volumes on windows generally don't work well with vagrant, docker-machine, docker, and those same limitations apply to compose.
The upside to this simple patch is it allows me to use docker-compose to build and start environments as long as I am creating containers that do not depend on volumes. I'll be using it for local development and experimentation.
I'm not quite sure how to go about implementing tests. I'm not sure what is required from a CI perspective to get windows testing in place and how best to approach disambiguating the platform in tests and build pipeline.
I'm happy to collaborate with anyone who is willing to work on this feature branch and help implement full windows support for compose, although my ability to work further it is will likely be limited to testing and debugging additional changes.