Go back
Several weeks ago, I gave up on using boot2docker in favor of using DigitalOcean droplets. This time, I gave boot2docker another try because it had just released version 1.1.0 (same as Docker’s). This version fixes the problem I had with forwarding ports.
This tutorial will show you how to install boot2docker-cli and be able to send commands to a Docker daemon running on a virtual machine. Also, I’m assuming you’ve installed Go in your Mac.
- Install docker client and boot2docker-cli:
$ brew install docker $ go get github.com/boot2docker/boot2docker-cli
(recommended) Symlink boot2docker-cli:
$ ln -s $GOPATH/bin/boot2docker-cli $GOPATH/bin/boot2docker
As of this writing, I ran boot2docker version and it did not show the version information.Create the virtual machine:
$ boot2docker init
Boot up the virtual machine:
$ boot2docker up
If you’re running this command for the first time, boot2docker you will need to export $DOCKER_HOST to point to the VM.Verify (see screenshot):
$ boot2docker ssh
boot2docker-cli creates two network interfaces (one will be used for NAT and another will be used for port forwarding on a private network):