Docker Quickstart Terminal?

Hi there,

I just start with Docker and installed the “DockerToolbox-1.9.0d.exe” on windows 7.1.
Everything seem to work but I have a problem on understanding the bridge networking.
I read from different places that we can see the “docker0” from ifconfig command line.
But from windows under bash.exe (started with docker quickstart terminal), there is no ifconfig but just ipconfig. And from ipconfig, there is no docker0 interface.
From the host, I cannot ping to my container ip but I can ping from container to container.
If if I tried to do the port forwarding from the host to the container, it is working fine.

I would think I miss something but dunno what…
Any helps would be appreciated.

The toolbox is essentially an installer, and there are several pieces in play.

  • Virtualbox - free hypervisor that will allow you to run VMs on your host.
  • boot2docker - lightweight OS that runs inside the virtualbox VM.
  • docker.exe - docker client binary that runs on your windows host
  • docker-machine.exe - this communicates with virtualbox and actually sets up the VM, and allows you to manage it.
  • Kitematic - a GUI docker client
  • Quickstart terminal - a shortcut to getting an environment where you can work with the remote docker daemon running in your docker-machine created boot2docker VM in virtualbox.

The quickstart terminal does only a couple things for you beyond opening a normal terminal:

  • runs docker-machine create --virtualbox-memory 2048 default if the “default” docker-machine doesn’t yet exist.
  • runs docker-machine env --shell cmd default and executes those commands in place.

The docker-machine env command outputs the environment variables needed by the docker.exe client binary to know how to connect to a remote docker daemon.

So, going back to your question, the reason linux commands aren’t available in the quickstart terminal is because it is actually a normal windows shell with some extra helpers built in. If you want to access the boot2docker VM that docker-machine creates, you can do that by running the docker-machine ssh default command.

Hopefully this helps!

Thank you Jeff for your explanation, it helps me to find out my missing part. Very much appreaciate for your helps.

For those who may meet the same problem as I was, I was missing the command “docker-machine ssh default”. After trying that, I can see the docker0 network interface now. Yay!!

Jeff, I started playing with Kitematci and the toolbox, can you please let me know when creating a new container or image, where are they placed on windows system? I read some articles about Volumes and would like to do some excercises with Volumes but can not figure out where are they placed in windows
Thanks inadvance

@eliassal

When you create a new container or image, they are not actually created on the Windows system itself per se. They are created inside of the /var/lib/docker directory of the VM where Docker is running (the default machine). It’s an internal Docker directory, not meant to be accessed directly.

As for volumes, by default your C:\Users directory is mounted into the VM at /c/Users (note the path difference: one is Windows, one is Linux), enabling you to access host files from the VM using VirtualBox shared folders. So a directory at C:\Users\nathan would be available at /c/Users/nathan in the VM.

Kitematic manages this for you somewhat, and in containers which have associated volumes, performs this bind mount and makes it accessible in the “Volumes” section for the container. These are available at C:\Users\name\Documents\Kitematic\containername on your Windows computer. You can click on the volume in the GUI to go straight to that directory.

So many thanks for your response, I have just checked C:\Userssalam\Documents, I have no Kitematic directory.
2nd; in Kitematic, when I click on a container, in the home tab I can see under VOLUMES “/data”, clicking on it triggers a dialogbox indicating the following :slight_smile:
Enable all volumes to edit files? This may not work with all databases.
–> Enable Volumes (link to be clicked).

Regards,

1 Like