-
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 on Mac OS X with boot2docker #488
Comments
Yes, #194 is the same thing. Basically the workaround goes something like this:
With things in their current state, I'd recommend instead just using Vagrant to create a basic VM with Docker installed, and run your stack commands in that VM directly. Just make sure you're using something besides the default Virtualbox shared folders for folder syncing. |
I wanted to share one simple workaround that has worked well for me so far. It worked on a set of fairly small projects, so I hope that someone can point out the flaws in this, whatever they may be, or find it useful. It goes thusly:
Now you should be in your project folder as seen from inside your container, and you can do the usual
|
hi @bijoutrouvaille are you still happy with this setup ? |
@nrolland: Some more progress was made over at #194 (comment). I'm using the setup described there quite successfully. |
@nrolland it works so well for me, that I doubt I would spend the time converting to the official method, were it hypothetically completed. |
@bijoutrouvaille Your example is basically running |
I tried @borsboom 's vagrant (thank you for putting it out there) and could compile with mostly no pb I completed that with what turns out to be a long text for information / discussion. I am running on a version of stack from git on my mac, which means unreleased version 0.1.9.0 at this time. So when I tried to That's really fair game, I was happy to see one more moving bit I did not think of pinned down along the build chain. beside, the binary to use in the docker builder can be specified in the stack.yaml file in "stack-exe :" from the configuration documentation so I could just ssh into vagrant image and installing the version manually I suppose Other people use the raw docker, as a VM + launching commands via Dockerfile : http://www.alfredodinapoli.com/posts/2015-11-03-how-i-deploy-haskell-code.html https://github.com/eiel/docker-haskell-stack/blob/master/Dockerfile_WithWarp In my case I wanted to deploy to heroku using their docker deployment, so I needed to :
For building If you want to use That highlight that it would be nice to have a repository of images and/or Dockerfiles, which build the stack toolset on top of various base images used by amazon, heroku, etc... to ease targeting for different venues. That would be easier if fpco dockerfile were published, as it would serve as a reference point. To solve the entire build + deploy story, @eiel explains あそこ how he is building from within docker and transforming a build into a deployment environment : from the heroku base to one with stack to one with warp, to one with the app which is really the deploy one : copies the binary in the /app directory conforming to the way heroku constrains image to be deployed, all in this lovely (hmm) Dockerfile format. heroku is one such case but I imagine other platform use their own image with build and deployment requirements, and we have a pattern here. (rant about value of container and why we might need compositionallity to build them) So may be the universal setup would be (would it ?):
That would comply to the "standard" out there and get a compositional handling of dependencies instead of monolithic Dockerfile. The project could be run locally with the same prod environment etc. A simpler alternative is of course to forego docker and to build static binaries in some vm, xcopy deploy them one way or another, which is really the way @adinapoli is using docker for. That is great to sidestep all that complexity, which should not be hard at all if we could factor out some common infrastructure, but until then is a massive pile of ... AFAIK |
@nrolland As you are using Nix, you might be interested in the upcoming Docker image build support in Nixpkgs NixOS/nixpkgs#11156 |
Hi,
I followed instructions on #337 to be able to run a ghcjs project on a Mac and got this:
@snoyberg suggested that @manny-fp might have some workarounds for this, would you be able to share?
The text was updated successfully, but these errors were encountered: