我是一个Docker新手,正在尝试运行makedev-services脚本,该脚本在skaffold.yml文件中声明(我与xxx交换了图像和sha名称):
- name: dev-services
build:
tagPolicy:
inputDigest: {}
local:
push: false
useBuildkit: true
artifacts:
- image: gcr.io/xxx/service-base
context: .
- image: gcr.io/xxx/api
context: server/api/
requires:
- image: gcr.io/xxx/service-base
alias: service_base
- image: gcr.io/xxx/media
context: server/media/app
requires:
- image: gcr.io/xxx/service-base
alias: service_base
deploy:
kustomize:
paths:
- ./k8s/local
- ./server/api/k8s/development
- ./server/media/k8s/development
当我运行它时,我得到这个错误:
Building [gcr.io/xxx/media]...
[+] Building 2.8s (4/4) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:3.14 1.2s
=> ERROR [internal] load metadata for gcr.io/xxx/service-base:xxx 2.6s
------
> [internal] load metadata for gcr.io/xxx/service-base:xxx:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code [manifests xxx]: 401 Unauthorized
Building [gcr.io/xxx/api]...
Canceled build for gcr.io/xxx/api
exit status 1. Docker build ran into internal error. Please retry.
If this keeps happening, please open an issue..
make: *** [dev-services] Error 1
有人知道这里可能有什么问题吗?可能是谷歌容器注册表吗?我用的是Minikube。有没有Minikube -或Docker -注册表可以试试?如果有,我需要在skaffold.yaml文件中修改什么?
提前感谢:)
4条答案
按热度按时间h4cxqtbf1#
错误:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code [manifests xxx]: 401 Unauthorized
表示Docker无法获得GCR存储库之一的授权。Docker通常会从您的
gcloud
设置中获取此信息。失败的原因有以下几个:gcloud auth login
重新登录。gcloud auth list
查看您的当前帐户。您可以使用gcloud config set account xxx
设置活动帐户,或设置环境CLOUDSDK_CORE_ACCOUNT
以设置会话期间的帐户。68de4m5k2#
对于任何其他人来这里从windows操作系统在您的Docker桌面设置,取消选中使用Docker编写V2这对我来说工作,我取消选中它的工作,我检查再试一次,并确保这是问题,是的,这是问题没有工作,直到我再次取消选中
smdncfj33#
运行
sudo chown -R [User] $(pwd)
然后以root权限运行容器(即:(单位:
sudo
)例如:
py49o6xq4#
我检查你的互联网连接,我有同样的问题得到了解决,通过检查互联网连接