分类目录: linux
Ubuntu安装docker
Post date:
Author: cyy
标签: Ubuntu
Number of comments: no comments
1.更新apt包索引
sudo apt-get update

2.安装如下包使得apt能够通过HTTPS使用仓库(有一个地方需要按y)
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common

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

4.添加stable仓库:针对x86_64/amd64
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

5.更新apt包索引
sudo apt-get update

6.安装最新版本的docker CE(有一个地方需要按y)
sudo apt-get install docker-ce

7.查看是否安装成功:
docker -v

8.打开docker服务:
systemctl start docker

9.查看docker镜像
docker images

安装成功!!!