How to do it…

Go through the following steps:

  1. Update the apt package index:
   $ sudo apt-get update
  1.  Install the packages to allow apt to use a repository over HTTPS:
       $ sudo apt-get install 
apt-transport-https
ca-certificates
curl
software-properties-common
  1. Add Docker's official GPG key:
        $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK

Verify that we have the correct key installed:

        $ sudo apt-key fingerprint 0EBFCD88
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <[email protected]>
sub rsa4096 2017-02-22 [S]
  1. Add the Docker apt repository using the stable channel:
       $ sudo add-apt-repository 
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"
If you want more frequent updates, and you don't mind a few bugs, you can use the nightly test channel. To use the test channel, all you need to do is change stable to test in the preceding command.
  1. Update the apt package index so that it includes the Docker repository we just added:
       $ sudo apt-get update
  1.  Install the latest version of Docker CE:
       $ sudo apt-get install docker-ce
  1. Verify that the installation worked:
       $ sudo docker container run hello-world
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.21.173