|
| 1 | +--- |
| 2 | +title: "Google Container Registry" |
| 3 | +description: Add the Google Container Registry to Coder. |
| 4 | +--- |
| 5 | + |
| 6 | +Google Container Registry (GCR) uses different authorization methods, unlike |
| 7 | +the generic `registry:2` image that requires a username and password. This |
| 8 | +article will show you how to add GCR to Coder using a `_json_key` file. |
| 9 | + |
| 10 | +## Adding a private GCR registry |
| 11 | + |
| 12 | +Create a `_json_key` file with your authorization information: |
| 13 | + |
| 14 | +1. In the [Google Cloud Console](https://console.cloud.google.com/), configure a |
| 15 | + service account for access to the GCR registry holding your images for use |
| 16 | + with Coder. |
| 17 | +1. Create a [JSON key |
| 18 | + file](https://cloud.google.com/container-registry/docs/advanced-authentication#json-key). |
| 19 | + |
| 20 | +Add your private GCR registry during the process of [adding |
| 21 | +images](../../images/index.md). To import an image: |
| 22 | + |
| 23 | +1. Go to **Images** > **Import Image** in the upper-right. |
| 24 | +1. In the dialog that opens, you'll be prompted to pick a registry by default. |
| 25 | + However, to _add_ a registry, click **Add a new registry**, which is the |
| 26 | + option located immediately below the registry selector. |
| 27 | +1. You'll be asked to provide a **registry name** and the **registry**. |
| 28 | +1. Since your registry is a **private registry**, provide the `_json_key` string |
| 29 | + for the **username** and the file's contents for **password**. |
| 30 | +1. Continue with the process of [adding your image](../../images/index.md). |
| 31 | +1. When done, click **Import**. |
0 commit comments