-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Create a version of boot2docker that works as Vagrant "base box" #29
Comments
+1 even if it only worked to an extent |
Chef and Puppet would not be required - it's not a requirement of Vagrant base boxes to support Chef and Puppet. |
@boffbowsh I actually copied the bullet list of requirements from the official documentation on Vagrant base boxes as it mentions: "The above are absolutely required of a base box in order to work properly with Vagrant". But I am also puzzled by that and it would be cool if they could be skipped. |
@durdn it says on their (the vagrant) site "Perhaps Chef, Puppet, etc. but not strictly required." |
Well, you'll be glad to know that we are preparing something with the docker guys that should solve your problem in a pretty neat way imho: run docker on the host without ever ssh-ing into the VM — On Sun, Dec 15, 2013 at 6:08 PM, Matt Apperson notifications@github.com
|
Awesome @steeve thanks for the update! |
refs moby/moby#1616 |
I just want to chime in on this. I think using Docker as client to a raw B2D VM is fantastic. But for those who want it, it should be very easy to make a B2D base box: you just have to modify the bootsync.sh to add the Vagrant public key: https://github.com/mitchellh/vagrant/tree/master/keys Then just package it up. I did this locally and it works and its super fast ( |
@mitchellh Fantastic Mitchell. I want to give this a go. Definitely keep me posted if you publish the Packer templates. |
+1 I have a hacky script that does this using the CoreOS Vagrantbox. Having something that boots even faster would be great. |
It would be fantastic to have boot2docker working with Vagrant so we can use it with https://github.com/noplay/docker-osx . At the moment we're using an Ubuntu image which is ridiculously large. @mitchellh – have you got a Packer script you can share? /cc @josephschorr |
Done, here you go: https://github.com/mitchellh/boot2docker-vagrant-box :) |
@mitchellh how does boot2docker-vagrant-box handle shared folder between host machine and a container? |
@teohm It doesn't, because Tiny Core Linux doesn't have VirtualBox guest additions support. If you use Vagrant with something like an Ubuntu VM, though, Vagrant will automatically install Docker for you and shared folders work just fine. |
Any alternative(s) for B2D to share folder between host machine (osx) and I'm trying to setup dev env in container and sync app codebase from my Mac On Thursday, January 9, 2014, Mitchell Hashimoto wrote:
Huiming |
Well, you can always try to setup something like nfs, samba or even sshfs over the network. |
@teohm Again, assuming you use a heavier OS like Ubuntu or install some of pre-reqs on your own, Vagrant will do all this for you. Vagrant as it is released now supports VirtualBox shared folders, VMware shared folders, and NFS (host to guest). If you have any of those, it will automatically set them up. The next version of Vagrant will support rsync, plain old SCP listening for file changes, and guest-to-host NFS (much better performance), at the least. Again, Vagrant will configure these and run them all for you. The easiest thing to do to get started is probably just use Ubuntu with this, but with proper configuration, Vagrant should be able to also automatically configure b2d to have these, too. |
@steeve VirtualBox shared folders would be a good starting area. You'll find quickly that the performance is ABYSMAL, however, and that'll affect utility of b2d. With only a few thousand files (Rails projects), the load time can be multiple orders of magnitude (I've seen 100x on large projects) slower than native. NFS brings this down considerably. NFS guest-to-host is VERY good. I'll try to help you out here... I'll ping you and this thread when I have something to show. |
Someone else mentioned in a blog post the possibility of using 9P and diod as an alternative to NFS.. |
https://github.com/SvenDowideit/dockerfiles/blob/master/samba/ is what I do atm |
I got a vboxsf from @steeve one : https://vagrantcloud.com/dduportal/boot2docker |
we're making boot2docker as simple and small as possible - so at this point, adding tools that are not relevant to all usecases (bare HW, vbox, vagrant, hyper-v, vmware, kvm, etc) is not on the plan. This may change in future, but we havn't completed our original feature set yet. |
I'm trying to get started with boot2docker on windows, but without support for shared folders, and without a docker CLI on the windows host (which is there on OSX), it's hard to find it useful beyond a cool demo. |
@benjamine You should be able to run docker build from your Windows machine because the build context (= current directory) is automatically uploaded to the docker host (the VM). So you can use the ADD instruction in a dockerfile to add files from your Windows machine to a new image. |
@LukasRos but how can I run docker on the windows machine? I don't want to run it in the VM (my Dockerfile is not there, it's on the windows host) as far as I could test, "docker" command is not there, when I double-click the desktop icon that's opening an ssh session into the VM (where yes, docker is available), but of course my files are not, I need to either:
|
@benjamine Not exactly sure about Windows since I'm using it on a Mac but the basic setup is the same:
Maybe someone on IRC who also uses Windows can help you better than me ... |
I know it works on OSX, this is what I wrote:
but why do you say "the docker command line tool can also be run from Windows" when you don't use Windows, and I'm saying precisely that's not there (and I have tested it in at least 2 Windows machines)? so starting over: there's no docker CLI on windows, maybe it's hidden? maybe docker CLI doesn't run on windows? (at least Go has support for windows) |
Hi! |
@gaffa you do know there already is a windows boot2docker installer that does everything, and will include the new native windows docker client very soon? and we added vbox based virtual folders in 1.3.0. |
Hi! |
Also: how do shared folders work? Is the current work dir automatically mounted or does one have to do that manually? |
b2d adds a host only network, so container ports are forwarded and accessible (nat port forwarding is both dangerous and not reliable) docker client for windows - moby/moby#9113 I'm pretty sure its very close - Microsoft seems to have several people on it, and the code already works - its now a matter of breaking it up into reviewable and testable parts. yes - boot2docker 1.3 auto mounts your user dir - on windows its mind you, I'm using a poor man's client on there too |
I have removed my repo and blog post as it seems to be working with boot2docker as well. Maybe consider documenting the workaround with alias or .bat-File forwarding the command to boot2docker or even include an alias to boot2docker with the name docker? |
It would be cool if a version of boot2docker could work as a Vagrant Base Box.
Unfortunately this would make it much bigger in size as it would require:
I understand this might be outside the scope of the project, but it would be cool nonetheless.
The text was updated successfully, but these errors were encountered: