Update and installation of the Ubuntu Docker version

Source: Internet
Author: User
Tags curl gpg

Suddenly found that his version of the Docker is particularly low, currently 1.9.1 belongs to the antique level, want to update the latest version, so the latest command can be supported. The study of the half-day has not been updated successfully, the updated version is always 1.9.1; blindfolded, looked for a group to ask only to know; access to the official website information to be resolved, once again record the relevant steps and design of the information site also has some small knowledge. Rising posture ...

Related website: 1.https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#prerequisites (official website)
2.http://www.cnblogs.com/ksir16/p/6530433.html (personal blog) 3.https://blog.lab99.org/post/docker-2016-07-1 4-faq.html#docker-zen-me-zhe-me-duo-ruan-jian-wo-gai-zhuang-na-ge (Docker question 100) Note text: First step: Delete the previous Docker version
      sudo apt-get remove docker docker-engine docker.io lxc-docker-1.9.1
The above command parsing: Remove is appended to the name of the Docker at the time of installation; Extended: 1. What are the differences about Docker,docker.io,docker-engine,lxc-docker? Where the Docker package in the Rhel/centos software source is named docker; the Docker package in Ubuntu software source is named docker.io  Span data-wiz-span= "Data-wiz-span" >lxc-docker     changed to Span class= "Apple-converted-space" >  docker-ce   docker-ce   this bag. 2. About Docker's current design version docker-ce and Docker-ee 2.1 Docker-ce is the community version is completely free of charge; from 1. The risk of upgrading the XX version to the 17.XX version is very small; docker-ce also distinguishes between two versions of Edge and stable versions; The 2.1.1 Edge version is released once a month, and users who like beginning something new can download this version, so security and errors can only be acquired and repaired in the current month2.1.2 Stable version is a quarterly update, that is, a stable version;The 2.2 Docker-ee version is supported by the company and can be used in certified operating systems and cloud providers, and can run certified containers and plug-ins from the Docker store. For businesses, the premium features of fees are provided. Step Two: Install the Docker image file
       $ sudo apt-get update (选择执行)       $ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
 
Step Three: Install the package to allow apt to use the repository via HTTPS (if it has been installed and can be skipped)
     $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common    


Fourth step: Add the GPG key to the Docker website
    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Note: After this command - Don't forget
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 Verify that you now have a fingerprint key by searching for the last 8 characters of the fingerprint .
$ sudo apt-key fingerprint 0EBFCD88

Fifth step: Set repository version
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Parse the above command: The above command installs a stable stable version of the package, if you want to set the edge or test version only need to change stable. Variants supported by different virtual machines can be added [ARCH=ARMHF] or [arch=s390x] only by modifying [arch = AMD64]

Sixth step: Install DOCKER-CE 6.1 Update apt Pack
 $ sudo apt-get update


Legacy issue: For update failed source package do not know if to deal with, ask the big God point one or two, again thanked! Problem:


6.2 Start installing the DOCKER-CE version, the official website explains that any existing installation of Docker will be replaced. There are doubts
$ sudo apt-get install docker-ce


Question: At the first step we forgot to delete the Docker file, which will prompt you when installing the error;


Prompts me to remove lxc-docker-1.9.1 before installing the Docker-ce version, and after removal, the installation is successful. The following command can be installed by selecting a version number, and you can choose a different version number to install it.
$ sudo apt-get install docker-ce=<VERSION>
Seventh Step: Verify that the installation is successful
$ sudo docker run hello-world
Attention:to upgrade Docker CE, first run sudo apt-get update, and then followInstallation Instructions, select the new version that you want to install.   about uninstalling Docker-ce 
$ sudo apt-get purge docker-ce
mirrors, containers, warehouses, or custom profiles on the host are not automatically deleted. Delete all images, containers, and warehouses:
$ sudo rm -rf /var/lib/docker

Updates and installs of the Ubuntu Docker version

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.