Ubuntu20.04安装Docker
你好呀,我的老朋友!我是老寇,欢迎来到老寇云平台!
跟我一起安装Docker
# 安装 Docker
# 1.更新包索引
sudo apt-get update
# 2.安装必要的系统工具
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.添加 Docker 仓库
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# 5.再次更新包索引
sudo apt-get update
# 6.安装 Docker CE
sudo apt-get install docker-ce
# 7.启动 Docker 服务
## 启动docker
sudo systemctl start docker
# 查看状态
sudo systemctl status docker
# 安装 Docker Compose
参考文章 Centos7安装Docker 23.0.6 中的 Docker Compose 安装步骤。
我是老寇,我们下次再见啦!
上次更新: 5/6/2025, 7:02:53 AM