debian11安装docker
No.1 安装依赖
1 | sudo apt install apt-transport-https lsb-release ca-certificates curl gnupg -y |
No.2 下载并添加 Docker GPG 密钥
1 | curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg |
No.3 更新
1 | sudo apt update |
No.4 安装 Docker
1 | sudo apt -y install docker-ce docker-ce-cli containerd.io |
验证版本
1 | sudo docker version |
开机自启动docker
1 | sudo systemctl enable docker |
检查Docker服务状态
1 | sudo systemctl status docker |