ARTIFACTORY: How to proxy a private Google Container Registry (GCR)?

AuthorFullName__c
Elina Floim Alper
articleNumber
000004161
FirstPublishedDate
2018-05-25T19:10:14Z
lastModifiedDate
2025-06-08

ARTIFACTORY: How to proxy a private Google Container Registry (GCR)?

Artifactory allows us to proxy a Google Container Registry by configuring a remote repository pointing to the GCR endpoint. Google offers the https://gcr.io and https://eu.gcr.io endpoints, both can be proxied in Artifactory, according to the needed endpoint. 

 

  1. First, create a Docker remote repository in Artifactory, and set the URL to point to https://gcr.io (or https://eu.gcr.io, depending on the need)
  2. In the Google Cloud Platform UI, navigate to IAM & Admin → Service Accounts → Choose your service account → navigate to the “Keys” tab of the chosen account:

User-added image

Click on “ADD KEY”, then “Create a new key” and choose JSON. Save the downloaded JSON file in an accessible location. 
  1. Navigate back to the remote repository configuration page in Artifactory, and set the credentials of the remote repository under the “Advanced tab” as follows: 
    User: _json_key
    Password: The password will be the content of the previously downloaded JSON file. Copy the file’s content and paste it here
    
    User-added image 
 
  1. Now, it is possible to use the created Docker remote repository. For this example, pulling a public image of busybox from the publicly available GCR repository:

User-added image

To view the pull command, click on the image name in the list (busybox) and then on the 3-dot menu of the preferred tag (in this case - latest) to copy the full pull command.

 

  1. Next, in the copied pull command, we will need to copy the part after the hostname (“gcr.io”) and replace the host part with our Artifactory host and the remorse repository name in order to pull the image using Artifactory. For instance:

docker pull <Artifactory_host>/google-remote/google-containers/busybox:latest

  1. Upon a successful pull, the image will be available in Artifactory under the repository’s remote-cache:

User-added image

 

Please note that images that are available under the gcr.io endpoint, will not necessarily be available under the eu.gcr.io endpoint. Therefore, before pulling an image, make sure it exists in the desired endpoint. 


In addition, make sure that the endpoint is accessible under the GCP project and that the user has sufficient permissions to pull from these endpoints directly.

User-added image