Can you share Docker Images uploaded to Google Container Registry between different accounts?

11/19/2015

We'd like to have a separate test and prod project on the Google Cloud Platform but we want to reuse the same docker images in both environments. Is it possible for the Kubernetes cluster running on the test project to use images pushed to the prod project? If so, how?

-- Johan
google-container-registry
kubernetes

2 Answers

11/19/2015

Yes, it's possible since the container images are on a per-container basis.

-- Michael Hausenblas
Source: StackOverflow

11/20/2015

Looking at your question, I believe by account you mean project.

The command for pulling an image from the registry is:

$ gcloud docker pull gcr.io/your-project-id/example-image

This means as long as your account is a member of the project which the image belongs to, you can pull the image from that project to any other projects that your account is a member of.

-- Kamran
Source: StackOverflow