How to debug the creation of docker container container in Vagrant

I am trying out a basic example of running a container in a vagrant docker host. For this I created

The Dockerfile:

  • Best Docker logging architecture using ELK stack
  • Is it possible to run kubernetes as a docker container?
  • Can't access pod logs
  • Starting Docker-Engine on boot
  • Unable to connect to Elasticsearch with PHP inside Docker
  • Start a service inside docker CentOS 7 container
  • FROM ubuntu
    #Other instructions
    

    The Vagrantfile

     Vagrant.configure("2") do |config|
      config.vm.provider "docker" do |d|
       d.build_dir =  "."
       d.has_ssh = true
       d.name = "vagrant-docker-test"
     end
    end
    

    When I run vagrant up it creates a virtualbox with the docker-host and a docker container with state -preparing. When I try to see all running containers in the docker host I see none. Is tehre a way to debug if the creation of container failed?

  • Docker jetty application does not see files from volume
  • Ignore directories with .dockerignore or volume?
  • npm install errors out saying ' Error: getaddrinfo ENOTFOUND npm.lab.myorg.com'
  • start multiple processes in docker container from Dockerfile
  • IP address and port of the host where Docker is running on?
  • what is the alpine linux equivalent package of ubuntu's libarmadillo-dev? [closed]
  • One Solution collect form web for “How to debug the creation of docker container container in Vagrant”

    I also had difficulties working on Dockerfile with the Vagrant Docker provider. In the end I now use a different approach: I use vagrant to run a Ubuntu VM on which Docker is installed ; and I use docker-compose to build and run the containers.

    This way I can get a shell in the Ubuntu vm and run docker build at will.

    Here’s the Vagrantfile I use to get that Docker enabled Ubuntu VM. Also take a look at this answer I made earlier which is related to the subject.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.