我试图按照[官方安装指南](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
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"
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"
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"
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上安装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 , 操作系统要求 。
对于任何使用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
看起来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问题。