Skip to content

Instantly share code, notes, and snippets.

@thiagozs
Last active December 15, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thiagozs/37637c9f59dd6398cfa116c1a42f832f to your computer and use it in GitHub Desktop.
Save thiagozs/37637c9f59dd6398cfa116c1a42f832f to your computer and use it in GitHub Desktop.
Docker installer checklist

Docker Installer

Checklist

  • Update apt-get.
$ sudo apt-get update
  • Get PGP key.
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Ubuntu version Repository
Precise 12.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-precise main
Trusty 14.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-trusty main
Wily 15.10 deb https://apt.dockerproject.org/repo ubuntu-wily main
Xenial 16.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-xenial main
  • Add repo to docker.list.
$ echo "<REPO>" | sudo tee /etc/apt/sources.list.d/docker.list
  • After create docker.list, update apt-get
$ sudo apt-get update
  • Check the instalation.
$ sudo apt-cache policy docker-engine

Prerequisites by Ubuntu Version

  1. Ubuntu Xenial 16.04 (LTS), Wily 15.10, Trusty 14.04 (LTS)..

    • For Ubuntu Trusty, Wily, and Xenial, install the linux-image-extra-* kernel packages.

    • To install the linux-image-extra-* packages:.

    • Open a terminal on your Ubuntu host.

  • Update your package manager.
$ sudo apt-get update
  • Install the recommended packages.
$ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

  1. Ubuntu Precise 12.04 (LTS)

    • For Ubuntu Precise, Docker requires the 3.13 kernel version. If your kernel version is older than 3.13, you must upgrade it.
    • Refer to this table to see which packages are required for your environment:
  • Update your package manager.
$ sudo apt-get update
  • Install both the required and optional packages.
$ sudo apt-get install linux-image-generic-lts-trusty
  • Reboot your host to use the updated kernel.
$ sudo reboot

Install the latest version

Make sure you have satisfied all the prerequisites, then follow these steps.

Note: For production systems, it is recommended that you install a specific version so that you do not accidentally update Docker. You should plan upgrades for production systems carefully. Log into your Ubuntu installation as a user with sudo privileges.

  • Update your APT package index.
$ sudo apt-get update
  • Install Docker.
$ sudo apt-get install docker-engine
  • Start the docker daemon.
$ sudo service docker start

If you need run Docker without sudo

Command line

sudo usermod -aG docker $(whoami)

or

sudo usermod -aG docker username

Try run the "Hello World"

$ sudo docker run hello-world

Output...

Hello from Docker.
This message shows that your installation appears to be working correctly.
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment