问题
I have a project that has a Dockerfile inside and inside that Dockerfile is a base private image. When I run gcloud app deploy
it will return an error with the below message
Error response from daemon: pull access denied for dean, repository does not exist or may require 'docker login'
I tried docker login
before running gcloud app deploy
but it did not work
回答1:
The easiest way to get this rolling is to push the private image up to Google Container Registry. The per-project registry is private (only available to folks who have access to your project).
回答2:
When you provide the docker file,a container is build from the cloud rather than locally. so your private base container will not be available while building. The best way is to build the container locally,then push to docker hub or gcr repository. They you can push the container in the repo by the command below
gcloud app deploy --image-url=[HOSTNAME]/[PROJECT-ID]/[IMAGE]
check on the documentation for more info https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry
来源:https://stackoverflow.com/questions/53319804/gcloud-app-deploy-with-private-docker-images