I. Prerequisites for installing Docker
1. Computers running 64-bit CPU architectures (currently only x86_64 and AMD64), please note that Docker does not currently support 32-bit CPUs.
2. Run Linux 3.8 or later kernel. Some older versions of 2.6.x or later kernels can also run Docker, but the results can vary greatly. Also, if you need help with the old kernel, it is often recommended that you upgrade to a later version of the kernel.
3, the kernel must support a suitable storage driver (storage driver), for example:
Device MANAGE;AUFS;VFS;BTRFS;ZFS
The default storage driver is typically device mapper or AUFS
4. The kernel must support and enable the Cgroup and namespace (namespace) functions.
Install the linux-iamge-extra-* kernel package. This package allows you to use the AUFS storage driver.
~$ sudo apt-get install linux-image-extra-$ (uname-r) linux-image-extra-virtual
Check the Ubuntu kernel version
~$ uname-a
Check Device Mapper
~$ ls-l/sys/class/misc/device-mapper
Second, install Docker
add Docker's apt warehouse
~$
sudo sh-c "echo deb Https://apt.dockerproject.org/repo ubuntu-trusty main >/etc/apt/sources.list.d/ Docker.list "
detect if the Curl command is installed
~$
Whereis CurlCurl:/usr/bin/curl/usr/share/man/man1/curl.1.gz
add a new GPG key to the Docker repository~$
sudo apt-key adv--keyserver hkp://p80.pool.sks-keyservers.net:80--recv-keys 58118e89f3a912897c070adbf76221572c52609d
Update APT Package index
~$
sudo apt-get update
Installing Docker~$
sudo lsb_release--codename | cut-f2
xenial~$
sudo sh-c "echo deb Https://apt.dockerproject.org/repo ubuntu-xenial main >/etc/apt/sources.list.d/ Docker.list "
~$
cat/etc/apt/sources.list.d/docker.list
Deb Https://apt.dockerproject.org/repo ubuntu-xenial main~$
sudo apt-get update~$
sudo apt-get install docker-engine
See if Docker was installed successfully~$
sudo docker info
Ubuntu 16.04 Lts installs Docker latest version