Over a million developers have joined DZone.

Introducing Docker Toolbox: the Fastest Way to Get Started With Docker

The new Docker Toolbox is quick and easy installer that will setup a full Docker environment by installing Docker, Machine, Compose, Kitematic, and VirtualBox.

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

One of the new features introduced in Docker 1.8 is Docker Toolbox. What is this toolbox?

Docker Toolbox

The Docker Toolbox is an installer to quickly and easily install and setup a Docker environment on your computer. Available for both Windows and Mac, the Toolbox installs Docker Client, Machine, Compose (Mac only), Kitematic and VirtualBox.

Docker Toolbox

Docker Toolbox is the fastest way to get up and running with Docker in development. In short, it provides the different tools required to get started with Docker:

  • Docker Client docker binary
  • Docker Machine docker-machine binary
  • Docker Compose docker-compose binary
  • Kitematic – Desktop GUI for Docker
  • Docker Quickstart Terminal app

If you have Docker CLI, Machine, Compose, and other tools installed in the /usr/local/bin directory then this would just overwrite them.

Specifically, Docker Toolbox 1.8.0a installs:

  • Docker Client 1.8.0
  • Docker Machine 0.4.0
  • Docker Compose 1.4.0
  • Docker Quickstart Terminal App
  • Kitematic 0.8.1
  • Virtual 5.0.0

After the installation completes, the versions are shown as:

> docker -v
Docker version 1.8.0, build 0d03096
> docker-compose -v
docker-compose version: 1.4.0
> docker-machine -v
docker-machine version 0.4.0 (9d0dc7a)

If an older version of VirtualBox is already running then it will show a message as shown:

The installer has detected that VirtualBox is out of date, and is still running. Please shut down all VMs, quit VirtualBox, and then restart the Docker Toolbox installation.

This flow needs to be slightly cleaned up (#63).

Read more details in DockerToolbox blog.

Docker Quickstart Terminal

It also created a new Docker category in Applications with links to Docker Quickstart Terminal and Kitematic. Clicking on the terminal app creates a default Machine instance and shows the following output:

Creating Machine default...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
To see how to connect Docker to this machine, run: docker-machine env default
Starting machine default...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Setting environment variables for machine default...

. . .

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/

docker is configured to use the default machine with IP
For help getting started, check out the docs at https://docs.docker.com

The configured Docker environment variables are:

~> env | grep DOCKER

VirtualBox is also updated to 5.0.0 r101573.

The Quickstart Terminal is mostly a regular shell but allows to create a default machine. It can be used to connect to other machines as well:

eval $(docker-machine env <MACHINE_NAME>)

Update Existing Docker Scripts to Docker 1.8

If you’d like to update existing Docker scripts to 1.8, then they are available at:

Upgrade Docker CLI:

curl https://get.docker.com/builds/Darwin/x86_64/docker-latest > /usr/local/bin/docker
chmod +x /usr/local/bin/docker

Upgrade Docker Machine:

curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Upgrade Docker Compose:

curl -L https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

Virtual Box needs can be downloaded from virtualbox.org.

Upgrade Docker VMs

Docker version of existing Machines can be found as:

~> docker-machine ssh lab cat /etc/os-release
PRETTY_NAME="Boot2Docker 1.7.0 (TCL 6.3); master : 7960f90 - Thu Jun 18 18:31:45 UTC 2015"

This can only be done after the machine is running though.

So start an existing machine as:

docker-machine start lab

And then upgrade it as:

~> docker-machine upgrade lab
Stopping machine to do the upgrade...
Upgrading machine lab...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.8.0/boot2docker.iso to /Users/arungupta/.docker/machine/cache/boot2docker.iso...
Starting machine back up...
Starting VM...

Java Applications Using Docker

Ready to start deploying your Java applications to Docker?

Get started with github.com/javaee-samples/docker-java.

The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.

cloud,docker,containers,virtualbox,docker compose,docker machine,kitematic

Published at DZone with permission of Arun Gupta, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}