我已经安装了 Ubuntu 17.04 (VirtualBox)。但是因为我有 Ubuntu 17.04,所以 docker 似乎不适用于 Ubuntu 17.04。是否有任何解决方法可以在 Ubuntu 17.04 上安装 Docker?
这是我的命令行历史记录:
2 curl -L https://github.com/docker/machine/releases/download/v0.10.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
3 docker-machine version
4 docker pull ubuntu:latest
5 sudo apt-get update
6 sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
7 sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
8 sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
9 sudo apt-key fingerprint 0EBFCD88
10 lsb_release -cs
11 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
12 sudo apt-get update
13 sudo apt-get install docker-ce -y
Run Code Online (Sandbox Code Playgroud)
这是实际的错误:
user@user-vm:~$ sudo apt-get update
Hit:1 http://ch.archive.ubuntu.com/ubuntu zesty InRelease
Hit:2 http://ch.archive.ubuntu.com/ubuntu zesty-updates InRelease
Get:3 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Hit:4 http://ch.archive.ubuntu.com/ubuntu zesty-backports InRelease
Ign:5 https://download.docker.com/linux/ubuntu zesty InRelease
Ign:6 https://download.docker.com/linux/ubuntu zesty Release
Ign:7 https://download.docker.com/linux/ubuntu zesty/stable all Packages
Ign:8 https://download.docker.com/linux/ubuntu zesty/stable amd64 Packages
Ign:9 https://download.docker.com/linux/ubuntu zesty/stable Translation-en_US
Ign:10 https://download.docker.com/linux/ubuntu zesty/stable Translation-en
Ign:11 https://download.docker.com/linux/ubuntu zesty/stable all DEP-11 Metadata
Ign:12 https://download.docker.com/linux/ubuntu zesty/stable amd64 DEP-11 Metadata
Ign:13 https://download.docker.com/linux/ubuntu zesty/stable DEP-11 64x64 Icons
Ign:7 https://download.docker.com/linux/ubuntu zesty/stable all Packages
Ign:8 https://download.docker.com/linux/ubuntu zesty/stable amd64 Packages
Ign:9 https://download.docker.com/linux/ubuntu zesty/stable Translation-en_US
Ign:10 https://download.docker.com/linux/ubuntu zesty/stable Translation-en
Ign:11 https://download.docker.com/linux/ubuntu zesty/stable all DEP-11 Metadata
Ign:12 https://download.docker.com/linux/ubuntu zesty/stable amd64 DEP-11 Metadata
Ign:13 https://download.docker.com/linux/ubuntu zesty/stable DEP-11 64x64 Icons
Ign:7 https://download.docker.com/linux/ubuntu zesty/stable all Packages
Ign:8 https://download.docker.com/linux/ubuntu zesty/stable amd64 Packages
Ign:9 https://download.docker.com/linux/ubuntu zesty/stable Translation-en_US
Ign:10 https://download.docker.com/linux/ubuntu zesty/stable Translation-en
Ign:11 https://download.docker.com/linux/ubuntu zesty/stable all DEP-11 Metadata
Ign:12 https://download.docker.com/linux/ubuntu zesty/stable amd64 DEP-11 Metadata
Ign:13 https://download.docker.com/linux/ubuntu zesty/stable DEP-11 64x64 Icons
Ign:7 https://download.docker.com/linux/ubuntu zesty/stable all Packages
Ign:8 https://download.docker.com/linux/ubuntu zesty/stable amd64 Packages
Ign:9 https://download.docker.com/linux/ubuntu zesty/stable Translation-en_US
Ign:10 https://download.docker.com/linux/ubuntu zesty/stable Translation-en
Ign:11 https://download.docker.com/linux/ubuntu zesty/stable all DEP-11 Metadata
Ign:12 https://download.docker.com/linux/ubuntu zesty/stable amd64 DEP-11 Metadata
Ign:13 https://download.docker.com/linux/ubuntu zesty/stable DEP-11 64x64 Icons
Ign:7 https://download.docker.com/linux/ubuntu zesty/stable all Packages
Ign:8 https://download.docker.com/linux/ubuntu zesty/stable amd64 Packages
Ign:9 https://download.docker.com/linux/ubuntu zesty/stable Translation-en_US
Ign:10 https://download.docker.com/linux/ubuntu zesty/stable Translation-en
Ign:11 https://download.docker.com/linux/ubuntu zesty/stable all DEP-11 Metadata
Ign:12 https://download.docker.com/linux/ubuntu zesty/stable amd64 DEP-11 Metadata
Ign:13 https://download.docker.com/linux/ubuntu zesty/stable DEP-11 64x64 Icons
Ign:7 https://download.docker.com/linux/ubuntu zesty/stable all Packages
Err:8 https://download.docker.com/linux/ubuntu zesty/stable amd64 Packages
404 Not Found
Ign:9 https://download.docker.com/linux/ubuntu zesty/stable Translation-en_US
Ign:10 https://download.docker.com/linux/ubuntu zesty/stable Translation-en
Ign:11 https://download.docker.com/linux/ubuntu zesty/stable all DEP-11 Metadata
Ign:12 https://download.docker.com/linux/ubuntu zesty/stable amd64 DEP-11 Metadata
Ign:13 https://download.docker.com/linux/ubuntu zesty/stable DEP-11 64x64 Icons
Fetched 89.2 kB in 12s (7'258 B/s)
Reading package lists... Done
W: The repository 'https://download.docker.com/linux/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/zesty/stable/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)
blu*_*llu 60
Docker 尚未为最新的 ubuntu 设置存储库,但这是一个简单的修复,因为它们的 ubuntu 16 版本是兼容的。暂时,只需编辑/etc/apt/sources.list并上线:
deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable
Run Code Online (Sandbox Code Playgroud)
替换zesty为xenial。运行sudo apt-get update,你可以继续sudo apt-get install docker-ce
小智 17
只是一个简短的说明:目前要在 ubuntu 17.04 (zesty) 上安装 docker-ce,您需要在边缘频道上:请参阅https://github.com/moby/moby/issues/32423#issuecomment-300164496
因此,您需要添加deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty edge到您的来源。
pea*_*eak 14
此线程中的信息已过时,可能导致 docker 安装出现故障;现在支持 ubuntu zesty,并提供软件包;查看安装手册:https : //docs.docker.com/engine/installation/linux/docker-ce/ubuntu/
旧版本的 Docker 被称为docker或docker-engine。如果安装了这些,请卸载它们:
$ sudo apt-get remove docker docker-engine docker.io
Run Code Online (Sandbox Code Playgroud)
如果您希望“自动”完成所有安装步骤,您还可以使用https://get.docker.com/ 上的安装脚本
更新 apt 包索引:
$ sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
安装软件包以允许 apt 通过 HTTPS 使用存储库:
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
Run Code Online (Sandbox Code Playgroud)
添加Docker官方的GPG密钥:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Run Code Online (Sandbox Code Playgroud)
验证密钥指纹是 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.
$ sudo apt-key fingerprint 0EBFCD88
pub 4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <docker@docker.com>
sub 4096R/F273FCD8 2017-02-22
Run Code Online (Sandbox Code Playgroud)
使用以下命令设置稳定存储库(针对amd64架构):
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Run Code Online (Sandbox Code Playgroud)
安装 Docker CE
$ sudo apt-get update
$ sudo apt-get install docker-ce
Run Code Online (Sandbox Code Playgroud)
感谢 Sebastiaan van Stijn 帮助我解决这个问题。
在 Ubuntu 17.04 中还没有官方支持 docker。另一种方法是从https://github.com/moby/moby/releases下载并安装 docker 的二进制文件。
例如,如果要从二进制安装 docker 版本 17.04.0-ce,请按照下列步骤操作:
$ wget https://get.docker.com/builds/Linux/x86_64/docker-17.04.0-ce.tgz
$ tar xzvf docker-17.04.0-ce.tgz
$ cd docker
Run Code Online (Sandbox Code Playgroud)
该docker目录包含所有二进制文件。您需要将此目录添加到您的PATH. 您需要先手动启动dockerd。
此页面包含有关如何从二进制文件安装和运行 docker 的更多详细信息。
| 归档时间: |
|
| 查看次数: |
50442 次 |
| 最近记录: |