docker ubuntu安装

1. 更新apt安装包索引

sudo apt-get update

2. 安装

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


3.添加官方Gpg key
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

 sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
4.更新apt索引
sudo apt-get update

5. 开始安装docker ce社区版
sudo apt-get install docker-ce

6. 验证是否安装成功
sudo docker run hello-world
 
 

猜你喜欢

转载自www.cnblogs.com/energy1010/p/9380855.html