我正在尝试使用docker和Vagrant部署一个简单的httpd服务器,以解决虚拟机共享文件夹的文件权限问题(我使用rsync和vagrant,并运行Windows作为主机)
当我运行vagrant up
时,VM启动(我可以通过VBox GUI确认)但是然后流浪者警告说不能与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
以及我运行vagrant reload
或vagrant ssh
时收到的警告消息:
==> default: The container hasn't been created yet.
这是我的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
有什么我想念的吗?
谢谢!