Vagrant doesn't automatically launch Docker Host VM

186 views
Skip to first unread message

Andrew Rosca

unread,
Jan 11, 2019, 4:37:41 PM1/11/19
to Vagrant
I'm trying to use the Docker provider with Vagrant per this documentation:

I get the following error:

C:\vagrant-docker> vagrant up

A
Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.

Command: ["docker", "ps", "-a", "-q", "--no-trunc", {:notify=>[:stdout, :stderr]}]

Stderr: An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1: open //./pipe/docker_engine: The system cannot find the file specified.

Stdout:

I don't have Docker installed on the host VM (it's Windows 7) and instead use VirtualBox. According to the documentation (link above):

Host VM
If the system cannot run Linux containers natively, Vagrant automatically spins up a "host VM" to run Docker. This allows your Docker-based Vagrant environments to remain portable, without inconsistencies depending on the platform they are running on.


How do I get Vagrant to spin up a Docker host in VirtualBox?

My Vagrantfile looks like this:

Vagrant.configure("2") do |config|
config.vm.provider "docker" do |d|
d.build_dir = "."
end
end

Thanks!

Alvaro Miranda Aguilera

unread,
Jan 15, 2019, 5:26:43 PM1/15/19
to vagra...@googlegroups.com
Hello

Thanks for reporting this.

We are reviewing the documentation, and seems the documentation could get an update.

can you test as:

Vagrant.configure("2") do |config|

config.vm.provider "docker" do |d|

d.force_host_vm = true

d.build_dir = "."

end



end


Thanks
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/753c20ba-1ca3-4320-8002-072ea03ea0b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Andrew Rosca

unread,
Jan 16, 2019, 9:50:03 AM1/16/19
to Vagrant
That worked, thanks!
Reply all
Reply to author
Forward
0 new messages