-
Notifications
You must be signed in to change notification settings - Fork 841
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
Docker: support using from non-x86_64-linux platforms #194
Comments
Is that vagrant file ready perhaps ;-)? I was reluctant to set up a full sized linux VM for launching stack/docker (too much redundancy). Thus I wondered if it would be possible to run the linux stack executable inside boot2docker directly on Mac OS. The boot2docker image itself is some kind of core linux (so says
I could then $ LD_LIBRARY_PATH=. ./stack-0.1.2.7 --help +RTS -A512K -N1 -M512M
stack-0.1.2.7: Heap exhausted;
Current maximum heap size is 536870912 bytes (512 MB);
use `+RTS -M<size>' to increase it. Is this legit? Does stack need >2G mem? Or is this some problem with |
|
cassava contravariant fclabels iproute stack test-framework-hunit yaml Added dependencies ignore pcre-heavy base-compat pcre-light string-conversions Signed-off-by: Magnus Therning <magnus@therning.org>
This turns out even to be a problem when the host and guest have both run x86_64-linux, but have different system libraries. Copying part of my comment from here:
|
Two upstream issues (at least) are blocking the possibility of having this "just work" out of the box:
|
With bf71d04 and 8f35021, we're a bit closer to supporting this. I've also cleaned up, documented, and published the Vagrantfile that I use to run Stack w/ Docker on Mac OS X: https://github.com/borsboom/vagrant-stack-docker. This is not "officially supported" in any way, but perhaps it will be helpful to some. |
moby/moby#16289 made it into Docker 1.9.1, and does indeed seem to fix the problem where interactive containers "hang" on exit. |
Windows 10 + latest Docker ToolBox
I thought it's the Windows Drive
|
Well, just out of curiosity I tried building a project of mine under OS X with Docker. And it worked just fine! All I did was:
I did not time the build, which is something that would be worth looking into. Versions:
Note however that Docker's Mac and Windows integration is planned to change a lot, so it might be best to wait and see on this front. EDIT: Well, I went ahead and timed it a bit. But this is the timing of running builds and test suites after all dependencies have been pre-built. Without Docker this takes 37 seconds, of which 3.8 is spent executing the tests:
With Docker it takes 44 seconds, 3.6 of which is spent running tests:
|
With large projects it makes a much bigger difference going through Virtualbox's synced folders (just figuring out whether there's any work to do can take a long time). I'm keeping an eye on developments with Docker for Mac and Docker for Windows. So far I've had trouble with Docker for Mac so awaiting for it to stabilize a bit more. I know Stack won't work with Docker on Windows because it doesn't do anything to handle the different path format on host vs. in the container, but we'd like to fix that as well. |
I've tested Stack with the recently out of beta Docker for Mac and it appears to work seamlessly. Only trouble I ran into was that building a really big project that uses a huge (> 10 GB) Docker image caused the Docker Engine to hang, but I think that's a Docker issue and has nothing to do with Stack itself. |
We now have a separate issue for the Windows case: #2421 I think we can now say that OS X support is working, and the OS X approach should work for any other non-Linux Un*x that gets first-class Docker support (or by using an approach like my vagrant-stack-docker), so my feeling is that any remaining non-Windows issues aren't really Stack specific but just upstream Docker issues. Any objection to closing this issue? |
No objection! |
@borsboom Would you like to elaborate as to what you did to make it work? My fresh install of Docker For Mac creates the following error for me: |
This will require downloading an x86_64-linux
stack
binary to bind-mount into the container, and will probably require some changes to bind-mounted path handling on Windows. It also requires a VM with specific settings to make the user ID mapping and project bind-mounting work.Note: I personally use stack with docker from OS X already (but manually copy in the x86-64-linux binary in). I have a Vagrantfile that isn't too far from being publishable.
The text was updated successfully, but these errors were encountered: