Docker安装步骤

安装使用仓库

1)sudo apt-get update

2)允许apt通过https使用repository安装软件包

sudo apt-get install 
    apt-transport-https 
    ca-certificates 
    curl 
    gnupg-agent 
    software-properties-common

 3)添加Docker官方GPG key

sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4)添加稳定版repository

sudo add-apt-repository 
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu 
   $(lsb_release -cs) 
   stable"

5)sudo apt-get update

6)安装最新版本的docker ce和containerd

sudo apt-get install docker-ce docker-ce-cli containerd.io

7)验证:docker --version

  sudo docker run hello-world

 
原文地址:https://www.cnblogs.com/youyuan1980/p/13897286.html