如何在 Centos 上安装特定版本的 Docker? [英] How to install specific version of Docker on Centos?

查看:30
本文介绍了如何在 Centos 上安装特定版本的 Docker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 Centos7 上安装 docker 1.8.2.文档没有说明任何有关版本控制的信息.有人可以帮助我吗?我试过了

I tried to install docker 1.8.2 on Centos7. The docs don't tell anything about versioning. Someone who can help me? I tried

wget -qO- https://get.docker.com/ | sed 's/lxc-docker/lxc-docker-1.8.2/' | sh
+ sh -c 'sleep 3; yum -y -q install docker-engine'

但没用.

我执行了:yum install -y http://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-1.8.2-1.el7.centos.x86_64.rpm

这可行,但我错过了 docker-storage-setupdocker-fetch

That works but I miss options as docker-storage-setup and docker-fetch

推荐答案

所以你可以使用这个命令来检查 yum repo 中有哪些版本:

So you can use this command to check which versions are in the yum repo:

sudo yum list docker-engine.x86_64 --showduplicates |排序 -r

然后使用它来安装您想要的列出的版本:

and then use this to install the version listed that you want:

sudo yum -y install docker-engine-<VERSION_STRING>

如果您只是想降级 docker 包(顺便说一句,这可以执行多次),您可以这样做:

If you simply want to downgrade the docker package (this can be performed multiple times, by the way), you'd do this:

sudo yum 降级 docker-engine

这会将之前版本的 docker 安装到您当前安装的版本中,同时清理更高版本.

and that will install the previous version of docker to the one you currently have installed while cleaning up the later version.

你可以一直降级,直到你得到你想要的,但这很烦人,所以我只用第一种方法:P

You could always keep downgrading until you got the one you want, but that's annoying, so I'd just go with the first method :P

这篇关于如何在 Centos 上安装特定版本的 Docker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆