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

查看:66
本文介绍了如何在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-setup docker-fetch

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

推荐答案

因此,您可以使用此命令检查yum存储库中的版本:

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

sudo yum列表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的先前版本安装到您​​当前安装的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天全站免登陆