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
本文来自博客园,作者:EJW,转载请注明原文链接:https://www.cnblogs.com/ejjw/p/18374346