ubuntu19.10 安装 docker-ce

2020-03-02 1342点热度 0人点赞 0条评论

原文链接

ubuntu19.10 安装 docker

安装步骤

1.更新现有的包列表

sudo apt update

2.使用apt安装一些允许通过HTTPS才能使用的软件包:

sudo apt 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.将Docker存储库添加到APT源:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

5.接下来,使用新添加的repo源中的Docker包更新包数据库:

sudo apt update

6.列出可用版本

apt-cache madison docker-ce

7.安装最新版本docker或者安装制定版本docker

sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io

8.将普通用户加入到docker组

sudo groupadd docker
sudo    gpasswd -a ${USER} docker
newgrp docker

王显锋

激情工作,快乐生活!

文章评论