title: cannot ssh Docker Provided Container with Vagrant. Vagrant ssh doesnt work too
body: <p>I am fairly new to Vagrant and Docker both. 
  What I am trying to do here is to get a container provided via docker in Vagrant and install a small webapp using the shell provisioner. </p>
  
  <p>Here is my Vagrantfile </p>
  
  <pre><code>Vagrant.configure(2) do |config|
  
  # config.vm.provision :shell, path: "bootstrap.sh"
  config.vm.provision :shell, inline: 'echo Hi there !!!'
  
     config.vm.provider :docker do |d|
       d.name="appEnvironment"
       d.image = "phusion/baseimage"
       d.remains_running = true
       d.has_ssh = true
       d.cmd = ["/sbin/my_init","--enable-insecure-key"]
     end
  end
  </code></pre>
  
  <p>The problem that i am facing here is that after the container is created it keeps running the following and eventually just stops. 
  I can see a running docker container when i type in <code>docker ps</code> but it hasnt run the provisioning part. I am assuming it is because the ssh wasnt successful</p>
  
  <pre><code>==&gt; default: Creating the container...
      default:   Name: appEnvironment
      default:  Image: phusion/baseimage
      default:    Cmd: /sbin/my_init --enable-insecure-key
      default: Volume: /home/devops/vagrantBoxForDemo:/vagrant
      default:   Port: 127.0.0.1:2222:22
      default:  
      default: Container created: 56a87b7cd10c22fe
  ==&gt; default: Starting container...
  ==&gt; default: Waiting for machine to boot. This may take a few minutes...
      default: SSH address: 172.17.0.50:22
      default: SSH username: vagrant
      default: SSH auth method: private key
      default: Warning: Connection refused. Retrying...
      default: Warning: Connection refused. Retrying...
      default: Warning: Connection refused. Retrying...
  </code></pre>
  
  <p>Can someone let me know where i might be wrong? I tried changing the image as well but without success.</p>