CentOS7 安装特定版本的Docker
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
sudo yum list installed | grep docker //列出就有版本 //删除相关安装包
sudo yum -y remove docker-ce.x86_64
sudo yum -y remove docker-ce-selinux.noarch //删除相关的镜像与容器
sudo rm -rf /var/lib/docker sudo yum remove docker docker-common docker-selinux docker-engine
查询可用版本
查询结果
* updates: centos.ustc.edu.cn
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror, langpacks
* extras: centos.ustc.edu.cn
docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
安装指定版本
安装结果
Total 369 kB/s | 30 MB 00:01:24
Retrieving key from https://download-stage.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:
Userid : "Docker Release (CE rpm) <docker@docker.com>"
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From : https://download-stage.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:container-selinux-2.42-1.gitad8f0f7.el7.noarch 1/2
Installing : docker-ce-17.12.0.ce-1.el7.centos.x86_64 2/2
Verifying : 2:container-selinux-2.42-1.gitad8f0f7.el7.noarch 1/2
Verifying : docker-ce-17.12.0.ce-1.el7.centos.x86_64 2/2
Installed:
docker-ce.x86_64 0:17.12.0.ce-1.el7.centos
Dependency Installed:
container-selinux.noarch 2:2.42-1.gitad8f0f7.el7
Complete!
[root@bogon ~]#
启动docker,并设置为开机自启
systemctl start docker && systemctl enable docker
方法二
安装 Docker
从 2017 年 3 月开始 docker 在原来的基础上分为两个分支版本: Docker CE 和 Docker EE。
Docker CE 即社区免费版,Docker EE 即企业版,强调安全,但需付费使用。
本文介绍 Docker CE 的安装使用。
移除旧的版本:

$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine

安装一些必要的系统工具:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
添加软件源信息:
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新 yum 缓存:
sudo yum makecache fast
查看可用版本的 Docker-ce:
yum list docker-ce --showduplicates | sort -r
注意:如果需要只显示table版本,可以关闭测试版本的list:
sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test
更新yum包索引
yum makecache fast
安装指定版本的docker-ce:
sudo yum install -y docker-ce-17.03..ce-.el7.centos
报错:如果在安装指定版本的docker时显示需要安装指定版本的docker-ce-selinux依赖包,请安装:
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
CentOS7 安装特定版本的Docker的更多相关文章
- CentOS7安装特定版本的Docker
查询可用版本 [root@bogon ~]# yum list docker-ce --showduplicates | sort -r 查询结果 * updates: centos.ustc.edu ...
- Centos7安装最新版本的docker
centos7 安装docker-ce ,最新版本docker,docker阿里云加速docker-ce是指docker的社区版 卸载老版本的 docker 及其相关依赖sudo yum remove ...
- centos7 安装 最新版本的docker
yum update # vim /etc/yum.repos.d/docker.repo //添加以下内容 [dockerrepo] name=Docker Repository baseurl=h ...
- CMD centos7 安装 最新版本的docker -- dockerfire 原语 ENTRYPOINT - 导入镜像 tar mariadb Dockerfile 构建镜像
yum update # vim /etc/yum.repos.d/docker.repo //添加以下内容 [dockerrepo] name=Docker Repository baseurl=h ...
- 容器学习笔记之CentOS7安装Docker(安装指定版本的Docker,加速,卸载)
0x00 概述 Docker从1.13版本之后采用时间线的方式作为版本号,分为社区版CE和企业版EE. 社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过 ...
- 使用rpm安装指定版本的docker(1.12.6)
一.原因 如果系统是Centos7.3,直接使用yum install docker安装的docker版本是1.13.1,导致在创建容器的会报错,错误如下: 所以为了防止安装高版本的docker引发的 ...
- 安装指定版本的docker服务
参考博客:Docker CE 镜像源站 参考博客:docker启动异常driver not supported 1. 说明 之前部署docker服务的时候都是安装最新的docker版本,并使用dock ...
- 安装指定版本的docker
安装 Docker 从 2017 年 3 月开始 docker 在原来的基础上分为两个分支版本: Docker CE 和 Docker EE. Docker CE 即社区免费版,Docker EE 即 ...
- 安装特定版本 sysbench 以及安装时指定特定的mysql客户端
step1: 下载安装源码 https://github.com/akopytov/sysbench (git clone https://github.com/akopytov/sysbench.g ...
随机推荐
- CVE-2019-0193:Apache Solr 远程命令执行漏洞复现
0x00 漏洞背景 2019年8月1日,Apache Solr官方发布了CVE-2019-0193漏洞预警,漏洞危害评级为严重 0x01 影响范围 Apache Solr < 8.2.0 0x0 ...
- 【Herding HDU - 4709 】【数学(利用叉乘计算三角形面积)】
题意:给出n个点的坐标,问取出其中任意点围成的区域的最小值! 很明显,找到一个合适的三角形即可. #include<iostream> #include<cstdio> #in ...
- steam游戏存档迁移
之前玩的盗版guacamelee等着打折入正,今天入了,不想重新打了,就把存档从盗版迁移了一下. 盗版的目录是F:\Guacamelee\Profile\ALI213\Saves,该目录下又一个SAV ...
- C#WinForm无边框窗体移动----模仿鼠标单击标题栏移动窗体位置
C#WinForm无边框窗体移动方法.模仿鼠标单击标题栏移动窗体位置 这里介绍俩种办法 方法一:直接通过修改窗体位置从而达到移动窗体的效果 方法二:直接伪装发送单击任务栏消息,让应用程序误以为单击任务 ...
- Laravel —— batch 实现
很多项目中会用到自动执行脚本的功能, 例如,自动统计上个月的注册用户,定时生成 csv 文件并邮箱发送给客户等等. Laravel 中的任务调度,可实现定时任务, 结合自定义 artisan 命令,即 ...
- Linux学习笔记——管道PIPE
管道:当从一个进程连接数据流到另一个进程时,使用术语管道(pipe).# include <unistd.h> int pipe(int filedes[2]); //创建管道 pipe( ...
- 深入理解JVM内存分配和常量池
一.虚拟机的构成 虚拟结主要由运行时数据区.执行引擎.类加载器三者构成: 而我们所说的JVM内存模型指的就是运行时数据区,下面具体分析一下运行时数据区: 二.运行时数据区组成和各个区域的作用 我们看到 ...
- fitnesse的安装
最近项目组有个单独的功能模块需要写自动化,由于是测试接口,我本来是想用之前那个项目组使用的robot framework+python,但是呢,项目组领导觉得,目前项目开发语言是java,相应的自动化 ...
- C/C++中double类型的比较
由于double浮点数的精度问题,所以在比较大小的时候,不能像int整数型那样,直接if(a==b),if(a<b),if(a>b) 要使用一个精度EPS: ; //一般这样子就够,但有时 ...
- (尚026)Vue_案例_动态初始化显示(尚025)
(1).当前页面需要变化什么样的数据? 答:列表;应该有个todos:[]数组;数组中包含每个元素均为一个对象;有数据titles:'xxx';(勾不勾选)complete:'布尔类型' (2).数组 ...