我正在使用以下Vagrant文件:
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 27017, host: 27017
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "docker" do |d|
d.run "mongoDB", image: "mongo:2", args: "-p 27017:27017"
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
end
然后
vagrant up
在尝试安装Docker时停止并显示以下错误:
/etc/init.d/vboxadd: 256: /etc/init.d/vboxadd: cannot create : Directory nonexistent
Unmounting Virtualbox Guest Additions ISO from: /mnt
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => D:/Vagrant/<SUBFOLDERNAME>
default: /tmp/vagrant-cache => C:/Users/<ME>/.vagrant.d/cache/ubuntu /trusty64
==> default: Configuring cache buckets...
==> default: Running provisioner: docker...
default: Installing Docker onto machine...
Docker installation failed.
我在代理人身后的公司网络中。 Windows 10笔记本电脑(64位)。 游民版本:2.2.1 VirtualBox版本:5.2.12
答案 0 :(得分:1)
出于某种原因,它不喜欢您的 ubuntu 版本。 尝试过: Vagrant.configure("2") 做 |config| config.vm.box = "bento/ubuntu-20.04" 结尾 它已经启动并正在运行。