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:

Docker on Ubuntu 16.04

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
..................Content has been hidden....................

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