docker 安装

Ubuntu 安装 Docker

# 更新
apt update

# 安装依赖
apt install apt-transport-https ca-certificates curl software-properties-common -y

# 添加 key
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
# 添加 Docker 源
add-apt-repository \
"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
# 更新
apt update

# 安装 Docker
apt install docker-ce -y

重启daemon:systemctl daemon-reload
重启docker服务:systemctl restart docker

开机自启动:systemctl enable docker

配置阿里云 Docker 镜像加速器

https://account.aliyun.com/login/login.htm?oauth_callback=https%3A%2F%2Fcr.console.aliyun.com%2F&lang=zh

 
posted @ 2021-05-30 14:42  keep2021  阅读(47)  评论(0编辑  收藏  举报