简体   繁体   中英

GCP error while building a container image

I have to test a functionality where I need to ping google.com from Google Cloud Run. For this, I created a simple python script to ping google.com. I added Dockerfile and .dockerignore to the directory as mentioned in Google Documentation . When I try to build a container image, I get the following error:

gcloud builds submit --tag gcr.io/project_id/ping-google
ERROR: (gcloud.builds.submit) The User is forbiden from accessing the bucket [project_id_cloudbuild]. Please check your organization's policy.

I am a storage admin and a Cloudbuild editor, what access I may be missing?

There was some organization policy set because of which I was not able to perform this using gcloud. But I was able to create the container from cloud shell editor using steps mentioned here

This tutorial downloads the helo world code. I edited it to add my code of pinging google, and my job was done

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM