无法从Ubuntu Bionic 18.04服务器安装Docker版本17.03.2?

时间:2018-08-06 10:04:19

标签: docker ubuntu

我拥有的当前版本是18.06.0-ce。

我按照docker documentation上的说明安装了特定版本。

该命令应该列出所有可用的版本。

IncidentService

但是它仅显示18.〜版本。

CHECK [memory_availability : x.0.x.x] **********************************
fatal: [x.x.x.x]: FAILED! => 
{  
   "changed":false,
   "checks":{  
      "disk_availability":{  
         "skipped":true,
         "skipped_reason":"Disabled by user request"
      },
      "docker_image_availability":{  
         "skipped":true,
         "skipped_reason":"Disabled by user request"
      },
      "docker_storage":{  
         "skipped":true,
         "skipped_reason":"Disabled by user request"
      },
      "memory_availability":{  
         "skipped":true,
         "skipped_reason":"Disabled by user request"
      },
      "package_availability":{  
         "changed":false,
         "invocation":{  
            "module_args":{  
               "packages":[  
                  "PyYAML",
                  "bash-completion",
                  "bind",
                  "ceph-common",
                  "cockpit-bridge",
                  "cockpit-docker",
                  "cockpit-system",
                  "cockpit-ws",
                  "dnsmasq",
                  "docker",
                  "etcd",
                  "firewalld",
                  "flannel",
                  "glusterfs-fuse",
                  "httpd-tools",
                  "iptables",
                  "ip 
tables-services",
                  "iscsi-initiator-utils",
                  "libselinux-python",
                  "nfs-utils",
                  "ntp",
                  "openssl",
                  "origin",
                  "origin-clients",
                  "origin-master",
                  "origin-node",
                  "origin-sdn-ovs",
                  "pyparted",
                  "python-httplib2",
                  "yum-utils"
               ]
            }
         }
      },
      "package_version":{  
         "failed":true,
         "failures":[  
            [  
               "OpenShiftCheckException",
               "Not all of the required packages are available at their requested version\norigin:3.10.0 \norigin-node:3.10.0 \norigin-master:3.10.0 \nPlease check your subscriptions and enabled repositories."
            ]
         ],
         "invocation":{  
            "module_args":{  
               "package_list":[  
                  {  
                     "check_multi":false,
                     "name":"origin",
                     "version":"3.10.0"
                  },
                  {  
                     "check_multi":false,
                     "name":"origin-master",
                     "version":"3.10.0"
                  },
                  {  
                     "check_multi":false,
                     "name":"origin-node 
",
                     "version":"3.10.0"
                  }
               ],
               "package_mgr":"yum"
            }
         },
         "last_failed":{  
            "failed":true,
            "invocation":{  
               "module_args":{  
                  "package_list":[  
                     {  
                        "check_multi":false,
                        "name":"origin",
                        "version":"3.10.0"
                     },
                     {  
                        "check_multi":false,
                        "name":"origin-master",
                        "version":"3.10.0"
                     },
                     {  
                        "check_multi":false,
                        "name":"origin-node",
                        "version":"3.10.0"
                     }
                  ],
                  "package_mgr":"yum"
               }
            },
            "msg 
":"Not all of the required packages are available at their requested version\norigin:3.10.0 \norigin-node:3.10.0 \norigin-master:3.10.0 \nPlease check your subscriptions and enabl 
ed repositories."
         },
         "msg":"Not all of the required packages are available at their requested version\norigin:3.10.0 \norigin-node:3.10.0 \norigin-master:3.10.0 \nPlease check your 
 subscriptions and enabled repositories."
      }
   },
   "msg":"One or more checks failed",
   "playbook_context":"install"
}

所以无法做到这一点。

apt-cache madison docker-ce

如何安装所需的版本。

我想要此特定版本的原因是因为Rancher docs声明它们是唯一兼容的版本。

enter image description here

4 个答案:

答案 0 :(得分:0)

以下是从官方docker指南中复制的内容。请阅读“注意:”并尝试找到要使用的存储库。下面的存储库指向最新版本。

使用以下命令来建立稳​​定的存储库。

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

注意:从Docker 17.06开始,稳定的版本也被推送到边缘并测试存储库。

答案 1 :(得分:0)

 $ sudo snap install docker

这提供了docker 17.06.02-ce,这是我为Ubuntu 18.04找到的最旧的构建

答案 2 :(得分:0)

您可以通过以下命令下载docker。我已经在Ubuntu 16.04上进行了测试。

sudo apt-get install docker-ce=17.03.2~ce-0~ubuntu-xenial

答案 3 :(得分:0)

作为docker文档

  

如果您无法使用Docker的存储库安装Docker CE,则可以   下载适用于您的发行版的.deb文件并手动安装。您   每次升级Docker CE时都需要下载一个新文件。

您可以使用脚本自爆。

# docker-ce depends on libltdl7 (>= 2.4.6)
wget http://archive.ubuntu.com/ubuntu/pool/main/libt/libtool/libltdl7_2.4.6-6_amd64.deb
sudo dpkg -i libltdl7_2.4.6-6_amd64.deb

wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_17.03.2~ce-0~ubuntu-xenial_amd64.deb
sudo dpkg -i docker-ce_17.03.2~ce-0~ubuntu-xenial_amd64.deb