ubuntu 安装指定版本docker

一、安装依赖

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y

二、配置源

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository  \
"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

三、安装docker

apt list -a docker-ce         ## 查看 Docker 软件源中所有可用的版本
sudo apt install docker-ce=<VERSION> docker-ce-cli=<VERSION> containerd.io
posted @ 2024-08-22 17:13  EJW  阅读(149)  评论(0编辑  收藏  举报