OSX boot2docker hangs on “Waiting for VM and Docker daemon to start …”

纵饮孤独 提交于 2019-11-30 03:04:08

I run into same problem on OSX Yosemite and have to do the following:

1) clean stuff with docker

  • boot2docker delete - Warning: this deletes all your docker images.
  • In Virtualbox, go to VirtualBox (menu) => Preferences => Network => Host Only Networks
    • Delete the host only networks, then I re-added them
  • boot2docker init
  • boot2docker up

2) very important, and you probabbly are missing it dealing with environmental variables, as they say:

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH=/Users/andi/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

For you the second export command will differ by user name - not andi, but something else. Just copy paste, and hit enter to apply this env variable, and then run e.g docker ps to check either thinks are working properly.

Upgrading Virtual Box is the key but I did this before the upgrade to 4.3.26:

  • Remove all from Virtual Box -> Preferences -> Network -> Host-only Networks
  • Remove existing boot2docker-vm in Virtual Box
  • Install the new version of Virtual Box
  • Run boot2docker application
gauden

For what it is worth, I tried all the solutions in this question and in this related question and none resolved my issue until I uninstalled and re-installed VirtualBox. This process upgraded the VirtualBox from version 4.2.16 to 4.3.22 (my previous one had been lying unused on the system for a few months).

Then boot2docker and docker worked without any other adjustments.

Had similar problem. It was cisco anyconnect vpn client which messed everything up for me. I found out from the internet that the simplest possible way of fixing this would be:

boot2docker stop
vboxmanage modifyvm "boot2docker-vm" --natpf1 "docker,tcp,127.0.0.1,2376,,2376"
boot2docker up
$(boot2docker shellinit)
export DOCKER_HOST=tcp://127.0.0.1:2376

Starting from this point everything worked just fine even after restarting vpn client.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!