Docker Community Forums

Share and learn in the Docker community.

Boot2Docker usage beyond the first three commands


(John T. Wodder II) #1

I am running Boot2Docker on Mac OS X 10.9.5 and I’ve found the Boot2Docker documentation severely lacking; there isn’t even a manpage! My unanswered questions about Boot2Docker (for now) are:

  1. What exactly is the difference between init and start? Why do we need both?

  2. What happens if I run init or start twice? What happens if I run start without first running init?

  3. I appear that all of my Docker images are stored in the VM rather than on my system directly. Do I have to do anything special to ensure this data persists across reboots (of both the VM and my machine)?

  4. What’s the preferred way to shut down the VM when I’m preparing to shut down my computer? If I forget to shut down the VM before shutting down my computer, will Bad Things™ happen? What if I perform an emergency restart of my computer? Will I need to perform some sort of cleanup afterwards to restore the VM and/or the downloaded images to a workable state?


(Sven Dowideit) #2
  1. init creates but does not start the virtual machine, start starts a previously inited vm
  2. you’ll get errors telling you there’s no vm created, or that the vm is already started.
  3. nope. the docker images and containers are in a persistent partition set up by the init
  4. In over a year of b2d releases, I think I’ve hard of Bad Things happening on sudden loss of power only once or twice.

as to a lack of info - its an open source project, and is highly dependent on contributions and improvements by its users - So we’d welcome pretty much any improvements that you can make.