Vagrant和Docker提供程序:未加载容器,Boot2Docker VM不可用于SSH

Ben*_*Ben 8 ssh vagrant docker vagrantfile boot2docker

我正在尝试使用docker和Vagrant部署一个简单的httpd服务器,以解决虚拟机共享文件夹的文件权限问题(我正在使用rsync与vagrant,并运行Windows作为主机)

当我运行时vagrant up,VM启动(我可以使用VBox GUI确认)但是然后vagrant警告不能与VM建立SSH连接并且永远不会加载容器.

这是它的输出vagrant up:

Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
default: Vagrant will now create or start a local VM to act as the Docker
default: host. You'll see the output of the `vagrant up` for this VM below.
default:
default: Checking if box 'mitchellh/boot2docker' is up to date...
default: VirtualBox VM is already running.
The Docker provider was able to bring up the host VM successfully
but the host VM is still reporting that SSH is unavailable. This
sometimes happens with certain providers due to bugs in the
underlying hypervisor, and can be fixed with a `vagrant reload`.
The ID for the host VM is shown below for convenience.

If this does not fix it, please verify that the host VM provider
is functional and properly configured.

Host VM ID: c89c99f7-0bb5-45ed-80c9-5dc256259366
Run Code Online (Sandbox Code Playgroud)

而我得到的警告信息,如果我跑vagrant reloadvagrant ssh:

==> default: The container hasn't been created yet.
Run Code Online (Sandbox Code Playgroud)

这是我的Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.network "forwarded_port", guest: 80, host: 80
  config.vm.provider "docker" do |d|
    d.build_dir = "."
    ports = ["80:80"]
  end
end
Run Code Online (Sandbox Code Playgroud)

有什么我想念的吗?

谢谢!