Vagrant: Unable to use docker as Vagrant provider on MacOS Sierra with 1.9.5

Created on 16 May 2017  ยท  4Comments  ยท  Source: hashicorp/vagrant

Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

1.9.5

Host operating system

MacOS Sierra 10.12.5

Guest operating system

NA

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.provider "docker" do |d|
    d.image = "hello-world"
  end
end

Debug output

$ vagrant up --provider docker
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.

Expected behavior

Vagrant should have detected the docker provider and set up an intermediate (boot2docker) VM

Actual behavior

Nothing happened except the Debug output.

Steps to reproduce

  1. Update from 1.8.7 to 1.9.5
  2. Try to run a docker Vagrant

References

Tried uninstalling and reinstalling Vagrant completely. To no avail.
Downgrading to 1.8.7 however did work!

providedocker

Most helpful comment

Haven't tested it yet but I guess someone should change the docs then where it says:

On systems that cannot run Linux containers natively, such as Mac OS X or Windows, Vagrant automatically spins up a "host VM" to run Docker.

Hope that would keep others from spending hours trying to find out why this happens.

All 4 comments

Hi there. This is due to a change in the options, which you can see here:

https://www.vagrantup.com/docs/docker/configuration.html#force_host_vm

Just add a d.force_host_vm = true and that should resolve the issue. Cheers!

Haven't tested it yet but I guess someone should change the docs then where it says:

On systems that cannot run Linux containers natively, such as Mac OS X or Windows, Vagrant automatically spins up a "host VM" to run Docker.

Hope that would keep others from spending hours trying to find out why this happens.

@MaartenW Ah, I missed that in the docs when updating the options. Thanks, I'll get that fixed up as well.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lebogan picture lebogan  ยท  3Comments

StefanScherer picture StefanScherer  ยท  3Comments

DreadPirateShawn picture DreadPirateShawn  ยท  3Comments

RobertSwirsky picture RobertSwirsky  ยท  3Comments

mpontillo picture mpontillo  ยท  3Comments