设置:
我由于stackoverflow重新安装了流浪汉。
我的Vagrantfile(来自https://github.com/bubenkoff/vagrant-docker-example.git):
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
#Check if you have the good Vagrant version to use docker provider...
Vagrant.require_version ">= 1.6.0"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker'
config.vm.provider "docker" do |d|
d.build_dir = "."
d.has_ssh = true
end
config.ssh.port = 22
end
出现以下错误:
C:\Users\<Snip ...>\vagrant-docker-example>vagrant up
Bringing machine 'default' up with 'docker' provider...
The executable 'docker' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
据我了解,流浪者会自动设置一个 启用了Docker的主机VM。为此,我是否必须在Windows中手动安装Docker?
谢谢您的帮助!
答案 0 :(得分:0)
如果将Vagrant的提供程序设置为docker
,它将尝试启动Docker容器并在那里进行设置。您确实已经安装了Docker。
如果您要查找安装了Docker的(Linux?)VM,则需要使用virtualbox
之类的面向VM的提供程序,并且在配置步骤中,请确保安装Docker。在这种情况下,您需要在主机上使用虚拟化软件,但是您并不需要专门安装Docker。