Docker installation for the first time in life

Source: Internet
Author: User

Ubuntu Series installs Docker through the system comes with package installation

The Ubuntu 14.04 version of the system has its own Docker package, which can be installed directly.

$ sudo apt-get update$ sudo apt-get install -y docker.io$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker$ sudo sed -i ‘$acomplete -F _docker docker‘ /etc/bash_completion.d/docker.io

If you install Docker using the operating system's own package, the currently installed version is the older 0.9.1. To install the updated version, you can do this by using the Docker source.

Install the latest version from the Docker source

To install the latest Docker version, you first need to install APT-TRANSPORT-HTTPS support and then install it by adding a source.

$ sudo apt-get install apt-transport-https$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9$ sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"$ sudo apt-get update$ sudo apt-get install lxc-docker
14.04 Previous Versions

If you have an older Ubuntu system, you need to update the kernel first.

$ sudo apt-get update$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring$ sudo reboot

Then repeat the above steps.

Start the Docker service after installation.

$ sudo service docker start


CentOS Series Installation Docker

Docker supports CentOS6 and later versions.

CentOS6

For CentOS6, you can use the EPEL library to install Docker with the following command

$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm$ sudo yum install docker-io
CentOS7

CentOS-ExtrasDocker is already in the CENTOS7 system library and can be installed directly:

$ sudo yum install docker

Start the Docker service after installation and let it load automatically with the system boot.

$ sudo service docker start$ sudo chkconfig docker on
 

Docker installation for the first time in life

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.