Hi all, When I try to build my dockerfile w/ the ...
# ask-community
r
Hi all, When I try to build my dockerfile w/ the prefect flow and push to GCR using, it fails at
storage.build()
. I get the following error:
Copy code
InterruptedError: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: <https://cloud.google.com/container-registry/docs/advanced-authentication>
I don't think this is a permissions issue to the GCR images because I tried building the docker file and pushing it using gcloud commands, and it worked successfully. The flow also failed on my prefect core server deployed on GCP with the same kind of authentication error:
z
Have you set the credentials in an environment variable as described at https://cloud.google.com/docs/authentication/production ?
r
Hi Michael, I've added the environmental variable to the docker file
Copy code
# Adding GCP credentials
ENV GOOGLE_APPLICATION_CREDENTIALS=/creds/key.json
But I can't even make it past the part of my build script that invokes storage.build()
Ok - I think I fixed the issue: I did
Copy code
gcloud auth configure-docker
and now the build script runs