How do I create a public image in Google Container Registry (GCR)?

Google Cloud Registry (GCR) now allows you to easily do this through the Console. Click on "Settings" on the left panel, and change the Visibility to Public.


GCR Visibility Settings


1) Create an empty cloud project to house the public registry

2) Push something to the registry (so the bucket gets created)

docker push gcr.io/{PROJECT_NAME}/{IMAGE_NAME}

3) Make all future objects in the bucket public:

gsutil defacl ch -u AllUsers:R gs://artifacts.{PROJECT_NAME}.appspot.com

4) Make all current objects in the bucket public (eg, the image you just pushed):

gsutil acl ch -r -u AllUsers:R gs://artifacts.{PROJECT_NAME}.appspot.com

5) Make the bucket itself public (not handled by -r!):

gsutil acl ch -u AllUsers:R gs://artifacts.{PROJECT_NAME}.appspot.com

6) upload more images if desired

Thanks to How do you make many files public in Google Cloud Storage? for providing some of the breadcrumbs here.