Book Image

Docker Bootcamp

By : Russ McKendrick, Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh
Book Image

Docker Bootcamp

By: Russ McKendrick, Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh

Overview of this book

<p>Docker allows you to create a robust and resilient environment to generate portable, composable, scalable, and stable application containers.</p> <p>The book starts by installing the core Docker Engine on MacOS, Windows 10 and Linux desktops. We will then define multi-container applications and understand the advantages of using containers locally. Once this is done, we will deploy containers on a single Docker host which is publicly accessible. Furthermore, we will learn how to deploy and configure a Docker Swarm cluster and explore networking and storage third-party plugins to extend the core Docker functionality. Towards the end, the book will demonstrate how to monitor and troubleshoot day-to-day problems in addition to various real world examples of container deployments.</p>
Table of Contents (15 chapters)

Docker on Ubuntu 16.04


If you have been looking at the Docker website, you will notice that there is not a Docker for Linux Desktop download, that is because there is no need for one. Docker is a Linux tool and will run natively on most Linux desktops and servers.

While Docker is available in the main Ubuntu repositories, I would recommend installing Docker using the official repository. You can do this by running the following command:

curl -sSL https://get.docker.com/ | sh

This will configure and install the latest version of Docker Engine. Once installed, you will receive a command to run to give your user permission to run Docker, run the command and then log out.

When you log back in, you will be able to run the following command:

docker version

You should see something like the following:

Note

One thing I haven't mentioned so far is that when we installed Docker for Mac and Windows two additional components were installed. These were Docker Machine and Docker Compose, we will be covering these in Chapter 2, Launching Applications Using Docker and Chapter 3, Docker in the Cloud.

To install Docker Machine run the following commands:

curl -L "https://github.com/docker/machine/releases/download/v0.9.0/docker-machine-$(uname -s)-$(uname -m)" -o /
tmp/docker-machine
chmod +x /tmp/docker-machine
sudo cp /tmp/docker-machine /usr/local/bin/docker-machine

To install Docker Compose, run the following commands:

curl -L "https://github.com/docker/compose/releases/download/1.
10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /tmp/docker-compose
sudo cp /tmp/docker-compose /usr/local/bin/docker-compose

Once installed you should be able to run the following two commands:

docker-compose version
docker-machine version