O'Reilly logo

Using Docker by Adrian Mouat

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Installation

This chapter will briefly cover the steps required to install Docker. There are a few gotchas, depending on which operating system you’re using; but with any luck, it should be a straightforward and painless affair. If you already have a recent version of Docker installed (say 1.8 or newer), you can safely skip to the next chapter.

Installing Docker on Linux

By far the best way to install Docker on Linux is through the installation script provided by Docker. While most of the major Linux distributions have their own packages, these tend to lag behind Docker releases, which is a serious issue, given the pace of Docker development.

Docker Requirements

Docker doesn’t have many requirements, but you do need to be running a reasonably modern kernel (version 3.10 or above, at the time of writing). You can check this by running uname -r. If you are using RHEL or CentOS, you will need version 7 or later.

Also remember that you need to be running on a 64-bit architecture. You can check this by running uname -m; the result should be x86_64.

You should be able to the use the script provided at https://get.docker.com to automatically install Docker. The official instructions will tell you to simply run curl -sSL https://get.docker.com | sh or wget -qO- https://get.docker.com | sh, and you’re welcome to do that, but I recommend you inspect the script before running it to verify you are happy with the changes it will make to your system:

$ curl https://get.docker.com ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required