Chapter 9. Docker Machine

In this chapter, we will take a look at Docker Machine. Docker Machine is a tool that supersedes boot2docker. It can be used to create Docker hosts on various platforms, including locally or in a cloud environment. You can control your Docker hosts with it as well. Let's take a look at what we will be covering in this chapter:

  • Installing Docker Machine
  • Using Docker Machine to set up the Docker hosts
  • Various Docker commands

Installation

Installing Docker Machine is very straightforward. There is a simple curl command to run and install it. It is recommended to install Docker Machine in /usr/local/bin, as this will allow you to issue the Docker Machine commands from any directory on your machine:

$ curl -L https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine

After issuing the curl command, you need to set the permissions in the docker-machine file that was just created in /usr/local/bin/:

$ chmod +x /usr/local/bin/docker-machine

You can then verify that Docker Machine is installed by issuing a simple docker-machine command:

$ docker-machine --help

You should get back all the commands and switches you can use while operating the docker-machine command.

Now these instructions are great if you are on Linux. But what if you are using Mac or even Windows? Then, you would want to use the Docker Toolbox to do your installation. This will not only install Docker Machine, but other pieces of the Docker ecosystem as well. To view a list of what all comes in the Docker Toolbox per platform, visit https://www.docker.com/docker-toolbox.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset