Liunx安装指定版本Docker(ubuntu)

(gitHub地址:https://github.com/cc-man/Docker_Learn

一、官方安装说明

二、操作系统

sudo apt-get update
sudo apt-get install \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual

三、安装步骤

  1. 更新apt包
sudo apt-get update
  1. 设置安装包以允许APT在HTTPS上使用存储库
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
  1. 添加Docker的GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. 验证密钥
sudo apt-key fingerprint 0EBFCD88
  1. 下载相关docker包
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

6.再次更新apt包

sudo apt-get update

7.查看可安装的docker版本包

apt-cache madison docker-ce

在这里插入图片描述
8.安装指定版本docker

sudo apt-get install docker-ce=17.09.0~ce-0~ubuntu-xenial

9.安装完毕

docker -version

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43397326/article/details/83109433