Installing Docker on Ubuntu

Docker is currently supported only on 64-bit architecture Linux and the Linux kernel must be 3.10 or later. At the time of writing this book, the latest version of the Docker was
17.03.0-ce. The following steps prescribe the installation procedure of the Docker Engine on Ubuntu Linux 16.04 in detail:

  1. First, the best practice for installing any software in Ubuntu begins with the resynchronization of the package repository. This step will essentially update the package repository in line with the latest published packages, thus we will ensure that we always get the latest published version using the command shown here:
      $ sudo apt-get update
Downloading the example code
You can download the example code files from your account at
http://www.packtpub.com  for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit
http://www.packtpub.com/support  and register to have the files e-mailed directly to you.
  1. Add the Docker package repository path for Ubuntu 16.04 to your APT sources, as shown here:
      $ sudo sh -c "echo deb https://apt.dockerproject.org/repo 
ubuntu-xenial main > /etc/apt/sources.list.d/docker.list"
  1. Add the GNU Privacy Guard (GPG) key by running the following command:
      $ sudo apt-key adv --keyserver 
hkp://p80.pool.sks-keyservers.net:80 --recv-keys
58118E89F3A912897C070ADBF76221572C52609D
  1. Resynchronize with the package repository using the following command:
      $ sudo apt-get update
  1. Install Docker and start the Docker service:
      $ sudo apt-get install -y docker-engine
  1. Having installed the Docker Engine, let's verify our installation by running docker --version as shown here:
      $ docker --version
Docker version 17.03.0-ce, build 60ccb22

Hurrah!! We have successfully installed Docker version 17.03.0 community edition.

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

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