-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Switch to boot2docker as recommended way to run Docker on OS X #26
Comments
https://github.com/fnichol/dvm could also be an alternative, but suffers from the same shortcomings as boot2docker. |
Here are my first tries bringin up fig into bootdocker :
In both cases, no output are given by the new fig :-( |
It's probably not worth trying to get Fig running inside the boot2docker VM itself – you can run it outside on OS X and point it at the remote API. |
Yeah, the point is that i'm not on OS X :-) Maybe Docker guys will push a Windows CLI someday :-) |
Ahah – got you, sorry. VirtualBox + Ubuntu might work better. boot2docker is meant to be nothing more than a hypervisor. |
Yeah, i was expecting a very very light docker dev VM : i'm going to only run fig + docker into this Linux box, and a <30 Mb box was an awesome path for me (instead of a big ubuntu or centos box :-) ). Any plan to support fig on Windows ? |
No plans currently! Open to pull requests, and it might be something we look into ourselves if there's enough demand. |
More details on current state of this: boot2docker/boot2docker#284 |
If anyone's looking into boot2docker and fig, The idea of boot2docker is that the host's filesystem is essentially read only. Everything should be in a container - so rather than installing fig into the boot2docker host, create a fig container which you run with a bindmounted docker exe, and access to a docker socket. |
In summary, install the boot2docker installer, then run:
You can add a
To set up your shell to automatically connect Fig and Docker to boot2docker, set
|
Doesn't work for me. Volumes still won't show up. /edit: And besides that: Pulling images with boot2docker is really slow compared to docker-osx. Any idea what's wrong? |
@bfirsh You probably mean
|
@kirel Nope. It mounts the entire |
Oops. There's also a
|
Works great. I did this in my profile to suppress the extra output from
|
We experienced severe delays on OSX (> 30 secs) when using volumes through the VBox shared folder approach. This is a general problem as described at moby/moby#4023 (comment). Makes it unusable for developing web apps. Waiting for the docker team to implement a clean solution (using a FUSE-based filesystem, it seems). |
What needs to happen for boot2docker to be able to mount volumes through fig as easily as docker-osx can? Is that on the roadmap somewhere? |
It's being worked on. If you want to use boot2docker, this is the best solution currently: #26 (comment) |
Yeah, I saw that, but it would be ideal to be able to mount specific host directories to specific container destinations, as you can now with docker-osx. Is it being worked on in boot2docker? Is there an issue for it? |
@SvenDowideit in this case, it seems fig docker container doesn't work, it looks quite tricky for volume setup. see inside I put the
The volume in
or (since docker is running host, so I specified the host absolute directory instead)
I use the It doesn't work, really hope it can work in boot2docker (windows), it will ease the work |
yup. we are working towards resolving this - but its not been easy |
I am fans of boot2docker and hope soon it can be solved, thank for your effort. |
@aer0s though vbox share solution is not recommended from b2d point of view officially ;-), for experiment, your solution works perfect for me. (windows 7) . Well done. |
As another option, here's how I'm running Fig with boot2docker and rsync (instead of guest additions) boot2docker init
boot2docker up
export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
# Setup working directory on b2d host and install rsync
boot2docker ssh "sudo mkdir -p `pwd` && sudo chown docker `pwd`"
boot2docker ssh "tce-load -wi rsync"
# rsync the working directory to b2d host
ssh-add ~/.ssh/id_boot2docker
rsync -av ./ docker@$(boot2docker ip 2>/dev/null):$(pwd)
fig up |
nice! |
@chrisconley How easy would it be to make it a two way sync back to the host? |
I was able to get @chrisconley 's method to work in Windows with a few extra steps (through Cygwin). This might be useful for @dduportal as well. # Needed for ssh-add to work
eval `ssh-agent -s`
# Fix permissions issue in Windows for private key
chgrp Users ~/.ssh/id_boot2docker
chmod 600 ~/.ssh/id_boot2docker From there, you'll need to be aware of the differences in file permissions and line ending on Windows. If you have any shell scripts, you might want to run
The |
@patrickheeney bi-directional is considered something you shouldn't use rsync for: http://unix.stackexchange.com/questions/12197/syncing-directories-in-both-directions-with-rsync I've just added your suggestion as boot2docker/boot2docker-cli#247 this is not likely to see the light of day in this form, but its interesting none-the-less. (yes, I've not tested it on Windows yet) |
boot2docker/boot2docker-cli#247 now has an sshfs based version of |
test-kitchen does something similar by |
It's getting close. boot2docker/boot2docker#534 |
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Also boot2docker/boot2docker-cli#258 Just needs docs now. |
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
@SvenDowideit @dduportal , just let you know my solution for run fig in docker is working in b2d 1.3 release, my One confused for beginner will be the run fig in docker, but the volume shall be host directory still. volumes:
since docker is running host, so I specified the host absolute directory instead) volumes:
|
i can't mount local folders on macosx via fig using boot2docker, though docker works fine. its a brand new installation (though i tried, pulling latest of Fig from master too)
installed VMBox extensions and mounted /Users directory in boot2docker
my fig.yml is simple as this
when i run it - verbosely with logging.debug enabled,
though if i run the same with docker
rebuilding fig with ADD in Dockerfile works fine, but its a pain to rebuild everytime when your code changes, so its a show stopper to use fig in development environment. I am not sure what else to do - or is it just me -, it will be great if you can advice on what to do. Thank you, |
for anyone landing here by googling and not #723 , docker 1.4.0 has a bug moby/moby#9628 which is fixed. simply downloading latest docker build into boot2docker fixes the problem.
|
@ybrs Thank you, You have saved my life. |
Fixes docker#26 Signed-off-by: Ben Firshman <ben@firshman.co.uk> Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
I know this is a very old issue. |
@nasht00 unfortunately at this point, I don't see that happening. OS X is not a Linux based distribution and simply doesn't have the kernel features that Docker relies on. I know some maintainers looked into using the "Sandbox API" in OS X, but that didn't look sufficient So, unless we see some major effort from Apple's side (like Microsoft is currently doing for porting to Windows), don't hold your breath. |
Probably blocked by boot2docker/boot2docker#63, boot2docker/boot2docker#84 and boot2docker/boot2docker#85.
See julien-duponchelle/docker-osx#17 and julien-duponchelle/docker-osx#29 for more background.
The text was updated successfully, but these errors were encountered: