0

我创建了一个简单的 go 服务器,并按照文档在 GCE 上部署服务器。但是我在构建时收到以下错误。我错过了什么?我也尝试过使用特定的版本号(即“1.16”),但仍然失败并出现类似的错误消息。

Starting Step #0
Step #0: Pulling image: mirror.gcr.io/library/golang
Step #0: Using default tag: latest
Step #0: Error response from daemon: manifest for mirror.gcr.io/library/golang:latest not found: manifest unknown: Failed to fetch "latest" from request "/v2/library/golang/manifests/latest".
...
Step #0: Error response from daemon: manifest for mirror.gcr.io/library/golang:latest not found: manifest unknown: Failed to fetch "latest" from request "/v2/library/golang/manifests/latest".
ERROR: failed to pull because we ran out of retries.
ERROR
ERROR: build step 0 "mirror.gcr.io/library/golang" failed: error pulling build step 0 "mirror.gcr.io/library/golang": generic::unknown: retry budget exhausted (10 attempts): step exited with non-zero status: 1
4

1 回答 1

2

由于某种原因,该golang图像目前无法通过此注册表获得。这可能是间歇性问题‍♂️</p>

$ docker pull mirror.gcr.io/library/golang
Using default tag: latest
Error response from daemon: manifest for mirror.gcr.io/library/golang:latest not found: manifest unknown: Failed to fetch "latest" from request "/v2/library/golang/manifests/latest".

// But weirdly this works
gcloud container images list --repository=mirror.gcr.io/library
// And this
docker pull mirror.gcr.io/library/alpine

因此,我会将该行与您的 yaml 文件中的 Golang Docker Hub 映像交换。

## Where it says:
- name: 'mirror.gcr.io/library/golang'
## Change to
- name: 'registry.hub.docker.com/library/golang'
于 2021-04-23T15:21:16.450 回答