install Docker Engine
时间: 2024-04-09 18:25:07 浏览: 69
以下是在De和CentOS上安装Docker的方法:
1. 在Debian上安Docker Engine[^1]:
```shell
# 卸载旧版本的Docker
sudo apt-get remove docker docker-engine docker.io containerd runc
# 设置Docker存储库
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# 安装Docker Engine
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
```
2. 在CentOS上安装Docker Engine[^2]:
```shell
# 卸载旧版本的Docker
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
# 设置Docker存储库
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 安装Docker Engine
sudo yum install docker-ce docker-ce-cli containerd.io
```
阅读全文