在64位的ubuntu上无法找到`docker-ce`包。

我试图按照[官方安装指南](https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository)在Ubuntu 64机器上安装Docker。

不幸的是,Ubuntu似乎无法找到docker-ce包。有什么办法可以解决这个问题,或者至少可以追踪发生了什么?

这里有一些细节给你...

$ uname --all; sudo grep docker /etc/apt/sources.list; sudo apt-get install docker-ce

Linux ubuntu 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable.
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable.

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker-ce
解决办法

Ubuntu 19.04 (Disco) 和 Ubuntu 19.10 (Eoan)

docker-ce还不能用于ubuntu 19.10,但你可以安装eoan包。

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable"

Ubuntu 18.10 (Cosmic)

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic test"

Ubuntu 18.04 (bionic)

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

Ubuntu 17.10

docker-ce包在官方docker(Ubutu Artful)仓库中可用,要安装它请使用以下命令。

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable"

Ubuntu 16.04

你可以在Ubuntu 16.04上安装docker-ce,方法如下。

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"

运行以下程序。

apt-cache search docker-ce

样本输出。

docker-ce - Docker: the open-source application container engine

安装docker-ce

sudo apt install docker-ce

Docker , 操作系统要求

评论(14)

对于任何使用Ubuntu 17.10(artful)并有此问题的人。

来自https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

要安装Docker CE,你需要以下的64位版本 Ubuntu版本。

Artful 17.10 (Docker CE 17.11 Edge 仅限)

Zesty 17.04

Xenial 16.04

(LTS) Trusty 14.04 (LTS)

和。

要添加边缘或测试库,在命令中的边缘或测试(或 都是)在命令中的 stable 后面。

因此,如果你使用Ubuntu 17.10 (artful),你需要添加这个。

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

注意到"边缘"一词被添加。如果你之前已经运行过这个命令,但没有"边缘"。你可以在/etc/apt/sources.list编辑source.list文件。之后,像往常一样刷新并安装docker-ce

sudo apt-get update
sudo apt-get install docker-ce
评论(0)

看起来docker会在12月docker-ce发布后进入官方仓库(稳定版)。然后是这个软件库。

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable"

应该可以使用。 同时,应该很快就会有边缘版本在

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu artful edge"

但现在还不能用。但是v17.11.0-ce-rc4昨天已经发布了,所以我希望它能在任何一天发布。

所以现在我使用17.04 repo中的软件包,因为GAD3R是建议

链接 到github问题。

评论(0)