brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

Initial findings in porting to Cygwin on Windows #158

Open alankent opened 8 years ago

alankent commented 8 years ago

I don't have time to complete this properly, but recording some notes here in case someone else finds useful as a starting point for porting this project to Windows with Cygwin.

After that the 'install' command seemed to work and set everything up surprisingly well, and I could use the script to start boot2docker, sync to docker host, etc. Nice work!!!

brikis98 commented 8 years ago

Wow, nice work! I'm amazed those were the only changes required. Is there a package manager that works with cygwin that could fill in fswatch and the other dependencies in install_dependencies? If so, all the other issues would be straightforward to fix. And if that's all it takes to support Windows, I'm totally game.

alankent commented 8 years ago

Unfortunately not that I know of - other than cygwin. If cygwin added fswatch support for example, that would be a great win. This seems to be the relevant page: https://cygwin.com/setup.html. The fswatch owner does not make a Windows binary available - so maybe that is step one. Find a volunteer to get fswatch included in cygwin. Then, as you say, the rest is probably straightforward for you to do.

(I don't think you can install packages from the command line in cygwin by the way - they have a separate tool that can install updates - assuming you are not running cygwin at the time. In Windows, you cannot replace binaries if the code is currently executing, so I think the install process had to be kept separate. So it is going to be just echo statements saying "you also need to install the following cygwin packages". Maybe that is all you do - echo cygwin packages you need, don't try to install them.)

brikis98 commented 8 years ago

That's a shame about package management on Cygwin.

One thought on maintainability: I don't even have a Windows box these days, so testing changes would be tough. In fact, even maintaining the code on OS X is tough, as we can't run integration tests due to #7. To add Windows to the mix, I'd probably need a solution to #7 for both OS X and Windows so we had a reasonable suite of integration tests that ran automatically. Otherwise, the code would almost certainly break after a short while.