docker ubuntu安装

在安装docker之前,建议加上国内apt 镜像资源, 比如清华、中科院的国内镜像资源

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
 
 
posted @ 2018-07-28 10:11  energy1989  阅读(21)  评论(0编辑  收藏  举报