文章预览
Docker 1.卸载冲突的软件包 for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done 2.更新系统软件包 sudo apt update 3.安装依赖包 sudo apt install apt-transport-https ca-certificates curl software-properties-common 4. 添加 Docker 中科大 GPG 密钥 sudo mkdir -p /etc/apt/keyrings sudo curl -fsSL http://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc 5. 添加 Docker 中科大镜像稳定版软件源 echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] http://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 6.再次更新软件包 sudo apt update 7.安装最新版本docker以及docker-compose sudo apt install docker-ce docker-ce-cli containerd.io sudo apt-get install docker-compose 8. 配置 Docker 使用
………………………………