ubuntu18.04下升级/安装docker到最新(19)版本

关闭docker

sudo systemctl stop docker

卸载旧版本:

sudo apt-get purge docker-ce
或
sudo apt-get remove docker docker-ce docker-io 

安装新版本

sudo apt update
sudo apt upgrade
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-cache madison docker-ce

ubuntu18.04下升级/安装docker到最新(19)版本_第1张图片

sudo apt install docker-ce=5:19.03.1~3-0~ubuntu-xenial
systemctl start docker
sudo systemctl start docker
sudo systemctl enable docker
sudo docker info

你可能感兴趣的:(Docker)