【发布时间】:2020-02-29 05:28:49
【问题描述】:
我已经尝试安装 Kubernetes 好几天了,但它已经从 Docker 开始了。我似乎在 Ubuntu 上找不到合适的 Docker 版本。 由于 Kubernetes 推荐 Docker 18.06.2 版本,我首先按照 Kubernetes 上的步骤进行操作:Kubernetes installation
我在哪里得到这个错误:
E: Version '18.06.2~ce~3-0~ubuntu' for 'docker-ce' was not found
Docker 说通过这个命令列出可用的版本:
apt-cache madison docker-ce
这让我明白了:
root@vmi257369:~# apt-cache madison docker-ce
docker-ce | 5:19.03.3~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
docker-ce | 5:19.03.2~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
docker-ce | 5:19.03.1~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
docker-ce | 5:19.03.0~3-0~ubuntu-disco | https://download.docker.com/linux/ubuntu disco/stable amd64 Packages
如您所见,没有 18.06,但只有 Kubernetes 不推荐的 19。
我已按照 Docker Docker installation 的此指南进行操作,但我似乎无法找到正确的 GPG 或 Docker 版本 18 所需的内容。
当然我也试过 Stackoverflow 上的帖子see here,结果是:
root@vmi257369:~# export VERSION=18.06.1-ce && curl -sSL get.docker.com | sh
# Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
Warning: the "docker" command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
INFO: Searching repository for VERSION '18.06.1-ce'
INFO: apt-cache madison 'docker-ce' | grep '18.06.1.*ce.*-0~ubuntu' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
ERROR: '18.06.1-ce' not found amongst apt-cache madison results
谁知道该怎么做?
回答时 通过这个命令
apt-add-repository "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main"
我收到此错误: 无法获取 403 Forbidden on IP .... 它在 Contabo 服务器上,也许这就是原因?
【问题讨论】:
标签: docker ubuntu kubernetes installation version