Running Docker containers with Vagrant
The first thing we'll investigate is how to run and develop simple Docker containers using Vagrant. In recent versions, Vagrant ships with a Docker provider that allows Vagrant users a simple environment to start and run containers.
Before we can start, however, we need to note that Docker builds on top of Linux containers. As such, a Docker container only runs on Linux operating systems. There are two main approaches to run Docker containers on development workstations:
- Developing Docker containers natively on a Linux platform: This is the approach used in a number of development books and guides, including The Docker Book by James Turnbull. Developing with Linux requires either a native Linux installation or perhaps a Linux desktop virtual machine, such as a Linux distribution running on a VMware virtual machine.
- Developing Docker containers using the boot2docker environment (http://boot2docker.io). boot2docker is a Linux VM designed to host Docker...