Ubuntu Install Docker

Source: Internet
Author: User
Tags curl

In UbuntuInstalled in Docker

Docker currently supports the following Ubuntu systems:

    • Ubuntu xenial 16.04 (LTS)
    • Ubuntu Wily 15.10
    • Ubuntu trusty 14.04 (LTS)
    • Ubuntu precise 12.04 (LTS)
Complex operations
  • Check kernel version

    Docker requirements are 64-bit Ubuntu (whichever version). In addition, the kernel must be at a minimum of 3.10. 3.10 The latest version or newer version also line. The reason is that prior to 3.10, the version lacks the features required by Docker to run some containers. These old versions of bugs often lead to data loss.

    • Use uname -r to check the kernel version:

      [~] uname -r4.10.0-28-generic
  • Check Device Mapper

    Is-l /sys/class/misc/device-mapper
  • Update apt Source

    Docker's APT warehouse includes Docker 1.7.1 and later. To set APT to use the latest repository package, use sudo or root permissions to log on to the computer. Update the installation package information to ensure that APT uses the HTTPS protocol and that the CA certificate has been installed.

    • Update the installation package information to ensure that APT uses https the protocol and that the CA certificate has been installed.

       $ sudo apt-get update $ sudo apt-get install apt-transport-https ca-certificates
    • Add a new GPG key

      $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    • Add or edit the Docker.list file in the source list to add entry (Ubuntu xenial 16.04 (LTS)) according to the system version

      vi /etc/apt/sources.list.d/docker.list

      Comment out the original content, add the following content:

      # deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial edgedeb https://apt.dockerproject.org/repo ubuntu-xenial main
    • Re-perform the update operation and remove the old repo

      $sudo apt-get purge lxc-docker  //没有安装的话,跳过
    • See if you have the correct version availablesudo apt-cache policy docker-engine

    • Docker recommends installing Linux-image-extra from above version 14.04

       sudo apt-get install linux-image-extra-$(uname -r)
    • Installing Docker

      sudo apt-get updatesudo apt-get install docker-enginesudo service docker start
    • Check

      [~] docker -vDocker version 17.05.0-ce, build 89658be
Simple operation
sudo apt-get install-y curl curl -sSL https://get.docker.com/ubuntu/ | sudo sh
Using a non-root user
1.  $ sudo groupadd docker2.  $ sudo gpasswd -a ${USER} docker3.  $ sudo service docker restart4.  login again`

Ubuntu Install 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.