Docker Pitfalls

Connect i/o timeout


docker version command complains

FATA[0032] An error occurred trying to connect: Get dial tcp i/o timeout 

while docker upgrade shows that the client tne the server are of the same version (which means they should work together).


The problem is because that I had created a host-only network vboxnet0 before in an experiment of building a VM cluster using VirtualBox on my Mac mini, and boot2docker init would also create a boot2docker VM that uses vboxnet0. However, boot2docker VM expects that the local network vboxnet0 has IP prefix, whereas my vboxnet0 has another IP prefix.


The solution is simple:

  1. Stop and destory boot2docker VM:

     boot2docker stop
     boot2docker destroy
  2. Delete my vboxnet0 local network from VirtualBox.

  3. Recreate boot2docker VM and start it:

     boot2docker init
     boot2docker up
     docker version

No space left on device


When I run docker build, it complains not enough disk space.


When above error happends with boot2docker, it means that the boot2docker VM, other than using has not enough disk space.


Clone the VMDK disk image created by boot2docker init into a VDI image, enlarge it, mount it to VM, and repartition it. More details can be found here.