Ubuntu System Installation Docker

Source: Internet
Author: User
Tags gpg

This article only introduces the method of installing Docker on Ubuntu System host, osx,windows and other systems please refer to the reader:

Window Installation Click here
OSX Install click here

Installing Docker in the Ubuntu system

Currently, the official support for the installation of Docker in the western Ubuntu system:

Ubuntu 14.04 64-bit
Ubuntu 13.04 64-bit
Ubuntu 13.10 64-bit
Ubuntu 12.04 64-bit
However, it is not that the Ubuntu (live Debian) version outside of the list above is not able to install Docker. As long as you have the proper kernel and Docker support, other versions of Ubuntu can also install Docker, but these versions are not officially supported, and the bug cannot be repaired by the official.

Installing Docker under the Ubuntu system requires the following steps:

Check the Prerequisites kernel

Use the following command to check the system kernel version:

[qifuguang@winwill~]$ uname -aLinux qifuguang-OptiPlex-90103.13.0-53#89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

You can see that the kernel version of my machine is 3.13.0-53, and installing Docker requires a Linux machine kernel version above 3.8, so it meets the requirements.

Check Device Mapper

We will use device Mapper as the storage driver, since the 2.6.9 version of the Linux kernel has begun to integrate device Mapper and provides a way to map fast devices to advanced virtual appliances. Device Mapper supports the concept of "automatic thin provisioning", which allows multiple virtual devices to be stored in one file system. It is therefore appropriate to use device mapper as a storage driver for Docker.

You can confirm that the device Mapper is installed by the following command:

[qifuguang @winwill  ~]$  ls-l/sys/class /misc /device -mapper   lrwxrwxrwx 1  root root 0  6  month 26  20  :  26 /sys/class / misc /device -mapper .. /.. /devices /virtual /misc /device -mapper   
Installing Docker

If the above conditions are met, Docker can be installed. The first thing to do is to add Docker's apt Repository, with the following code:

[[Email protected]~]$ sudo sh-c] echo deb Https://get.docker.io/ubuntu Docker main >/ETC/APT/SOURCES.LIST.D/DOCKER.L Ist

Next, to add the GPG key for the Docker repository, the command is as follows:

[qifuguang@winwill~]$ https://get.docker.io/gpg | sudo apt-key add -OK

After that, we update the APT source:

[[Email protected]~]$ sudo apt-get update ignores http://security. Ubuntu. comTrusty-security Inrelease Ignore Http://ppa. Launchpad. NETTrusty Inrelease Get:1Http://security. Ubuntu. comTrusty-security Release. GPG[933B] Ignore Http://extras. Ubuntu. comTrusty Inrelease Get:2Http://security. Ubuntu. comTrusty-security Release [63.5KB] Ignore Http://ppa. Launchpad. NETTrusty Inrelease hit Http://extras. Ubuntu. comTrusty Release. GPGGet:3Http://ppa. Launchpad. NETTrusty Release. GPG[ theB] Hit Http://extras. Ubuntu. comTrusty release Get:4Https://get. Docker. IODocker Inrelease hit Http://ppa. Launchpad. NETTrusty Release. GPGHit Http://extras. Ubuntu. comTrusty/main sources hit Http://extras. Ubuntu. comTrusty/main AMD64 Packages gets:5Http://ppa. Launchpad. NETTrusty Release [15.1KB] Gets:6Http://security. Ubuntu. comTrusty-security/main AMD64 Packages [304KB] Ignore Https://get. Docker. IODocker Inrelease hit Http://extras. Ubuntu. comTrusty/main i386 Packages -% [Connecting CN. Archive. Ubuntu. com] [Waiting for header] [6Packages17.0............

Now you are ready to install the Docker software package:

[[email protected]~]$ sudo apt-get install lxc-docker正在读取软件包列表... 完成正在分析软件包的依赖关系树正在读取状态信息... 完成将会安装下列额外的软件包:  lxc-docker-1.7.0下列软件包将被【卸载】:  lxc-docker-1.6.2下列【新】软件包将被安装:  lxc-docker-1.7.0下列软件包将被升级:  11104,964820 kB 的额外空间。您希望继续执行吗? [Y/n]Y
Check if Docker is installed successfully

After the installation is complete, you can use the Docker Info command to confirm that Docker is properly installed and running:

[Qifuguang@winwill~]$ sudo docker infoContainers: 5Images:  theStorage Driver:AufsRoot Dir:/var/lib/docker/aufsbacking Filesystem:ExtfsDirs:  the Dirperm1 supported: falseExecution Driver:native-0.2Kernel Version: 3.13.0- --genericOperating System: Ubuntu 14.04.2 LTSCPUs: 8 Total Memory: 15.56 GiBName:qifuguang-OptiPlex-9010ID: SNVW: WBCG: theBZ:2L63:AFQR: Zmds: ki4z: Xiqz: ENHV: O7pi: QMDP:6DQ3Username:quinn2012Registry:[https://index.docker.io/v1/]WARNING: NoSwap limit Support

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ubuntu System Installation Docker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.