How to install specific version of Docker on Centos?

前端 未结 5 542
轮回少年
轮回少年 2021-02-06 07:55

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/ |         


        
5条回答
  •  佛祖请我去吃肉
    2021-02-06 08:29

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

    sudo yum list docker-engine.x86_64 --showduplicates | sort -r

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

    sudo yum -y install docker-engine-

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

    sudo yum downgrade docker-engine

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

    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

提交回复
热议问题