2

Trying

boot2docker init

as suggested in

https://github.com/boot2docker/boot2docker/issues/436#issuecomment-50135355

but getting this error:

boot2docker init
error in run: Failed to initialize machine "boot2docker-vm": exit status 1

Any idea what is happening and how to get rid of this error?


EDIT. I am using VirtualBox v4 as provided by Boot2Docker.

Dmitri Zaitsev
  • 13,548
  • 11
  • 76
  • 110

3 Answers3

1

Boot2docker is currently not compatible with VirtualBox 5, see Virtualbox 5.0 Compatibility.

A workaround is to use the current development version of docker-machine. On Mac OS, you can use brew to install it:

$ brew install --HEAD docker-machine
$ docker-machine  -v
docker-machine version 0.4.0-dev (HEAD)
$ docker-machine create -d virtualbox boot2docker
$ eval $( docker-machine env boot2docker )
$ docker version
hzpz
  • 7,536
  • 1
  • 38
  • 44
  • I have never installed VB 5, my current version that came with Boot2Docker is 4.3.28 – Dmitri Zaitsev Jul 15 '15 at 14:35
  • Nevertheless, you might try to use docker-machine instead of boot2docker. If you use VirtualBox 4, you can use the stable version, of course (omit `--HEAD` when installing with brew). – hzpz Jul 15 '15 at 14:47
  • I actually did install `docker-machine`, which is however v 0.3.0 and is warned to be "experimental", so I presume v 0.4.0-dev is even more so. On the other hand, boot2docker is production-ready as far as I understand. – Dmitri Zaitsev Jul 17 '15 at 17:41
  • Not at all! From the [README](https://github.com/boot2docker/boot2docker#caveat-emptor) on GitHub: "Boot2Docker is currently designed and tuned for development. Using it for any kind of production workloads at this time is highly discouraged." – hzpz Jul 17 '15 at 17:57
  • Ouch! At least it works now without errors, which I can't say about docker-machine, unfortunately. – Dmitri Zaitsev Jul 18 '15 at 05:46
  • Just to understand your answer - "A workaround" means only for VB5? What about VB4? – Dmitri Zaitsev Jul 18 '15 at 05:48
  • The workaround is mainly supposed to get you around the issue that boot2docker 1.7.0 is not compatible with VirtualBox 5. But, if you had any other issues with boot2docker, I would have suggested you try docker-machine, too. I personally tried this on my machine and it worked perfectly. But since boot2docker seems to work for you now, you obviously don't need an alternative. – hzpz Jul 18 '15 at 12:18
1

It has been repaired with 1.7.1

see: https://github.com/boot2docker/boot2docker/issues/979#issuecomment-121574822

Ma Guowei
  • 651
  • 6
  • 5
0

Try and start boot2docker with a minimal PATH.

As I illustrated in "How to get Docker to run on a Windows System behind a corporate firewall?", I use:

Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\prgs\git\latest\bin;C:\prgs\git\latest\usr\bin;C:\Program Files\Oracle\VirtualBox;c:\prgs\Boot2DockerforWindows;C:\Users\43640119\prog\b2d\

That is

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0;
C:\prgs\git\latest\bin;
C:\prgs\git\latest\usr\bin;

C:\Program Files\Oracle\VirtualBox;
c:\prgs\Boot2DockerforWindows;C:\Users\43640119\prog\b2d\

With C:\prgs\git\latest being a symlink to C:\path\to\PortableGit-2.4.5.1-4th-release-candidate-64-bit\: Git-for-Windows includes the latest from Git, with a recent msys2-based bash.

And VirtualBox being 4.x, not the last 5.0, as mentioned by hzpz

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250