在 gcp 上安装 docker

Installing docker on gcp

正在尝试 运行

curl https://releases.rancher.com/install-docker/20.10.sh | sh

https://rancher.com/docs/rancher/v2.5/en/installation/requirements/installing-docker/

在 Google Compute Engine 实例上出现以下错误:

错误:在 apt-cache madison 结果中找不到“20.10.7”

GCP 实例是 2 vcpu 2 gb e2-small

在 GCP 控制台中;如果您尚未根据教程创建新的 Google 计算引擎,则可以在将其命名为 Select 区域后选择 Ubuntu 并启用 HTTP 并单击“创建”。 为 Google 计算引擎启用并创建 SSH 密钥并使用命令 sudo -s(超级用户登录)。 Sudo apt -get install docker.io(docker 将被安装并准备就绪)。 请参考这个installation documentation.

版本 2.10.7 在此存储库中不可用:

$apt-cache 麦迪逊搜索 docker-ce docker-ce | 5:20.10.14~3-0~ubuntu-impish | https://download.docker.com/linux/ubuntu impish/stable amd64 软件包 docker-ce | 5:20.10.13~3-0~ubuntu-impish | https://download.docker.com/linux/ubuntu impish/stable amd64 软件包 docker-ce | 5:20.10.12~3-0~ubuntu-impish | https://download.docker.com/linux/ubuntu impish/stable amd64 软件包 docker-ce | 5:20.10.11~3-0~ubuntu-impish | https://download.docker.com/linux/ubuntu impish/stable amd64 软件包 docker-ce | 5:20.10.10~3-0~ubuntu-impish | https://download.docker.com/linux/ubuntu impish/stable amd64 包

我修复了下载 20.10.sh 文件并将行更改为另一个版本(即:VERSION=20.10.14)的问题。它应该有效。