Ubuntu18安装docker-ce

1.先更新系统并安装相关依赖包

$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common

2.新建并编辑etc/apt/sources.list.d/docker.list文件

$ sudo vi /etc/apt/sources.list.d/docker.list

文件内容如下:
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

3.添加秘钥

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

4.更新docker源apt仓库信息

$ sudo apt update

5.安装docker-ce

$ sudo apt install docker-ce

6.验证

$ docker --version

原文链接:https://my.oschina.net/ykbj/blog/3002620 

猜你喜欢

转载自blog.csdn.net/Big_Baby_Z/article/details/90109743