9

I'm trying to deploy a simple httpd server with docker and Vagrant to get around the file permission issue with the virtualbox shared folders (I'm using rsync with vagrant, and running Windows as the host)

when I run vagrant up, the VM starts (I can confirm that with the VBox GUI) but then vagrant warns that no SSH connection can be established with the VM and the container is never loaded.

Here it the output of the 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

and the warning message I get if I run vagrant reload or vagrant ssh:

==> default: The container hasn't been created yet.

Here is my 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

Is there something I'm missing?

thanks!

Ben
  • 966
  • 2
  • 10
  • 24
  • Please move your question to [su] or [sf]. It's [off-topic](http://stackoverflow.com/help/on-topic) here. – Martin Prikryl May 25 '15 at 10:38
  • 4
    @MartinPrikryl I disagree, my question is `about software tools commonly used by programmers; and is a practical, answerable problem that is unique to software development`. I think it is at the right place. Super User is not about programming tools, and Server Fault is for `Professional system and network administrators` which is not the case, especially considering that the `vagrant` and `docker` tags are much more used here than on Server Fault. – Ben May 25 '15 at 11:22
  • What does `vagrant ssh-config c89c99f7` give (assuming "c89c99f7" is the correct ID, otherwise, `vagrant global-status` will tell you)? – Jon Burgess May 29 '15 at 06:58
  • Why are you using vagrant? I assume you're on OS X so you can use boot2docker directly. Then docker-compose can help you up with linkers containers. *boot2docker ip * is a command for getting IP for your local VM. – bsnux Jun 19 '15 at 17:34
  • on mac os you actually want to use docker-machine for provisioning vm on which docker host will be run: https://docs.docker.com/machine/ – eddd Jan 18 '16 at 12:17
  • or now Docker for mac: https://docs.docker.com/docker-for-mac/ – diginoise Sep 08 '16 at 07:40

0 Answers0