How to install specific version of Docker on Centos?

前端 未结 5 460
轮回少年
轮回少年 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:13

    Installing specific or old version of Docker on Centos8 or later versions:

    If docker is running first stop it so we don't have corrupted files later

    sudo systemctl stop docker
    

    Then Remove the previously installed version of Docker

     sudo yum remove -y docker-ce docker-ce-cli
    

    Now list the available Docker Engine versions in the repo

    [cloud_user@info2c ~]$ yum list docker-ce --showduplicates | sort -r
    docker-ce.x86_64                3:20.10.2-3.el8                 docker-ce-stable
    docker-ce.x86_64                3:20.10.1-3.el8                 docker-ce-stable
    docker-ce.x86_64                3:20.10.0-3.el8                 docker-ce-stable
    docker-ce.x86_64                3:19.03.14-3.el8                docker-ce-stable
    docker-ce.x86_64                3:19.03.13-3.el8                docker-ce-stable
    

    To install specific version here is command

    $ sudo yum install docker-ce- docker-ce-cli- containerd.io
    

    In our case command would be like this

    [cloud_user@info2c ~]$  sudo yum install docker-ce-3:19.03.13-3.el8  docker-ce-3:19.03.13-3.el8
    [sudo] password for cloud_user: 
    Last metadata expiration check: 0:09:37 ago on Sat 23 Jan 2021 05:18:06 PM UTC.
    Dependencies resolved.
    ================================================================================================================================================================================================================================================
     Package                                                   Architecture                                       Version                                                        Repository                                                    Size
    ================================================================================================================================================================================================================================================
    Installing:
     docker-ce                                                 x86_64                                             3:19.03.13-3.el8                                               docker-ce-stable                                              24 M
    Installing dependencies:
     docker-ce-cli                                             x86_64                                             1:20.10.2-3.el8                                                docker-ce-stable                                              33 M
     libcgroup                                                 x86_64                                             0.41-19.el8                                                    baseos                                                        70 k
    
    Transaction Summary
    ================================================================================================================================================================================================================================================
    Install  3 Packages
    

提交回复
热议问题