docker - 无法从 GCP Container Registry 拉取镜像
问题描述
我正在尝试docker pull
从 GCP 容器注册表。
版本:
username@this_machine:~$ docker --version
Docker version 1.9.1, build a34a1d5
username@this_machine:~$ gcloud --version
Google Cloud SDK 319.0.0
alpha 2020.11.13
beta 2020.11.13
bq 2.0.62
core 2020.11.13
gsutil 4.55
kubectl 1.16.13
username@this_machine:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.6 LTS
Release: 14.04
Codename: trusty
username@this_machine:~$ gcloud auth configure-docker
WARNING: Your config file at [/mnt/ext4/users/username/.docker/config.json] contains these credential helper entries:
{
"credHelpers": {
"gcr.io": "gcloud",
"us.gcr.io": "gcloud",
"eu.gcr.io": "gcloud",
"asia.gcr.io": "gcloud",
"staging-k8s.gcr.io": "gcloud",
"marketplace.gcr.io": "gcloud"
}
}
Adding credentials for all GCR repositories.
WARNING: A long list of credential helpers may cause delays running 'docker build'. We recommend passing the registry name to configure only the registry you are using.
gcloud credential helpers already registered correctly.
username@this_machine:~$ docker pull eu.gcr.io/gcp-project-1/my_docker_image
Using default tag: latest
Pulling repository eu.gcr.io/gcp-project-1/my_docker_image
Error: Status 405 trying to pull repository gcp-project-1/my_docker_image: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with `dockerd --disable-legacy-registry`. See https://cloud.google.com/container-registry/docs/support/deprecation-notices"
username@this_machine:~$ docker pull eu.gcr.io/gcp-project-1/my_docker_image:latest
Pulling repository eu.gcr.io/gcp-project-1/my_docker_image
Error: Status 405 trying to pull repository gcp-project-1/my_docker_image: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with `dockerd --disable-legacy-registry`. See https://cloud.google.com/container-registry/docs/support/deprecation-notices"
当我运行docker pull python
它的工作。所以它可以从 docker hub 获取,而不是 gcp。
我已经完成gcloud auth login
并尝试了具有正确权限的服务帐户(这一切都适用于其他所有机器)
我认为我的 cloudSDK 或 docker 安装已损坏。但我不知道,所以如果有任何想法,我将不胜感激。
解决方案
推荐阅读
- php - PHP 目录问题,无法使用 (../) 返回目录
- sql - 与直接函数调用相比,为什么 CROSS APPLY with Functions 这么慢?
- javascript - 如何检查对象是否已经在 three.js 场景中然后替换它?
- assembly - 汇编(AT&T 格式)操作数值
- c++ - std::vector 移动而不是交换到空向量并释放存储空间
- java - 二维数组打印第一个负数和每行最后一个之间的元素总和
- android - 如何使用 google 签名按钮确定我是否已登录或注册我的 android 应用程序
- sas - SAS 等价于 rleid 函数
- c# - Linq SelectMany 基于两个属性
- javascript - Elm,模型如何与订阅保持同步?