我推送了docker image
cf push --docker-image rocker/rstudio --docker-username rstudio-test以及转储过程何时开始
我发现了401错误
Failed getting docker image by tag: Get https://registry-1.docker.io/v2/rocker/rstudio/manifests/latest: token auth attempt for registry: https://auth.docker.io/token?account=myuser&scope=repository%3Arocker%2Frstudio%3Apull&service=registry.docker.io request failed with status: 401 Unauthorized Going to retry attempt: 1
Failed getting docker image by tag: Get https://registry-1.docker.io/v2/rocker/rstudio/manifests/latest: token auth attempt for registry: https://auth.docker.io/token?account=myuser&scope=repository%3Arocker%2Frstudio%3Apull&service=registry.docker.io request failed with status: 401 Unauthorized Going to retry attempt: 2
Failed getting docker image by tag: Get https://registry-1.docker.io/v2/rocker/rstudio/manifests/latest: token auth attempt for registry: https://auth.docker.io/token?account=myuser&scope=repository%3Arocker%2Frstudio%3Apull&service=registry.docker.io request failed with status: 401 Unauthorized Going to retry attempt: 3
Failed getting docker image by tag: Get https://registry-1.docker.io/v2/rocker/rstudio/manifests/latest: token auth attempt for registry: https://auth.docker.io/token?account=myuser&scope=repository%3Arocker%2Frstudio%3Apull&service=registry.docker.io request failed with status: 401 Unauthorized
Staging process failed: Exit trace for group:
builder exited with error: failed to fetch metadata from [rocker/rstudio] with tag [latest] and insecure registries [] due to Get https://registry-1.docker.io/v2/rocker/rstudio/manifests/latest: token auth attempt for registry: https://auth.docker.io/token?account=myuser&scope=repository%3Arocker%2Frstudio%3Apull&service=registry.docker.io request failed with status: 401 Unauthorized
Exit status 2我创建了清单和put环境选项
env:
CF_DOCKER_PASSWORD:test我试着搜索信息,但我仍然不知道答案
发布于 2018-10-19 21:15:00
这..。
env:
CF_DOCKER_PASSWORD:test不是你想要的。这会告诉cf cli设置一个您的应用程序可以访问的环境变量。只有在你的应用程序已经启动之后才能访问。我们需要先下载容器,然后才能运行它,所以在这里设置它就太晚了。
您希望在计算机上本地设置一个环境变量,以便当cf cli运行时,它知道要使用哪个密码。
所以你想..。
Mac/Linux:
export CF_DOCKER_PASSWORD=testWindows:
set CF_DOCKER_PASSWORD=test然后,您可以运行cf push --docker-image rocker/rstudio --docker-username rstudio-test。cf cli将从您的本地环境变量读取密码,并将其传递给平台,以便平台可以下载您的docker镜像。
作为一名仅供参考的用户,Mac和Linux用户也可以使用速记CF_DOCKER_PASSWORD=test cf push ...。不过,我不相信这在Windows上是有效的。
在这里查看更多详细信息:
https://docs.cloudfoundry.org/devguide/deploy-apps/push-docker.html#private-repo
https://stackoverflow.com/questions/52777747
复制相似问题