Google Container Registry (GCR) uses different authorization methods, unlike the
registry:2 image that requires a username and password. This article
will show you how to add GCR to Coder using a
_json_key file with your authorization information:
- In the Google Cloud Console, configure a service account for access to the GCR registry holding your images for use with Coder.
- Create a JSON key file.
Add your private GCR registry during the process of adding images. To import an image:
- Go to Images > Import Image in the upper-right.
- In the dialog that opens, you'll be prompted to pick a registry by default. However, to add a registry, click Add a new registry, which is the option located immediately below the registry selector.
- You'll be asked to provide a registry name and the registry. You can leave the registry kind as the default Generic value.
- Since your registry is a private registry, provide the
_json_keystring for the username and the file's contents for password.
- Continue with the process of adding your image.
- When done, click Import.