Building a Development Environment on macOS with Boot2Docker
Setting Up a Docker Engine Environment
Development Environment
- macOS Yosemite 10.3.3
- VirtualBox 4.3.28
- Vagrant 1.7.2
The following are required to use Docker:
Docker Engine
- Docker client
- Runs the docker command
- Docker server
- Runs Docker containers
Docker Engine Architecture
- The Docker server and client communicate over RESTful HTTPS
1 | +---------+ +----------+ |
To set up the above, install the following:
Boot2Docker
- Software that lets you set up both the Docker client and the Docker server together
Boot2Docker architecture
- Docker Client
- Linux VM
- Docker Server
1 | | | Docker Server | |
Installation Steps

Install the Boot2Docker package

Run the installer


Run the following in a terminal or similar
- Create the Linux VM
1 | $ boot2docker init |
- Start the Linux VM
1 | $ boot2docker start |
- Check the Linux VM status
1 | $ boot2docker status |
- Set the environment variables
When you start with boot2docker start, run the export settings it prints out
1 | $ export DOCKER_HOST=tcp://192.168.59.103:2376 |
- Check the overall Docker Engine configuration
1 | $ docker info |
Caveat
If the Storage Driver shown by docker info is aufs,
you will not be able to install httpd in a Docker container.
You need to check which Storage Driver is in use beforehand.
Summary of Dockerfile Best Practices
Building a Development Environment on macOS with Boot2Docker
https://kenzo0107.github.io/en/2015/06/28/boot2docker-on-macosx/
