This document describes how you can use Gemini Cloud Assist to list your Artifact Registry repositories and container images stored in Docker-format repositories.
Learn how and when Gemini for Google Cloud uses your data.
Limitations
Your Google Cloud project must be created in an organization.
Before you begin
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
- If you don't have any container images stored in an Artifact Registry repository, then follow the instructions in Store Docker container images in Artifact Registry.
- Ensure that Gemini Cloud Assist is set up for your Google Cloud user account and project.
- Ensure that you have the necessary Identity and Access Management (IAM) permissions to complete the tasks in this document.
Required roles
To get the permissions that
you need to list repositories and container images in Artifact Registry,
ask your administrator to grant you the
Artifact Registry Reader (roles/artifactregistry.reader
) IAM role on the project or repository.
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
Open Gemini Cloud Assist chat
You can open the Cloud Assist panel to use Gemini Cloud Assist chat from anywhere in the Google Cloud console.
- In the Google Cloud console, select a project where you have container images
stored in Artifact Registry.
- To open the Cloud Assist panel, click spark Open or close Gemini AI chat.
- To enter a prompt, type the prompt and click send Send prompt.
List repositories
You can prompt Gemini Cloud Assist to list repositories in the current project and filter the response by the following:
- Location (required). The location of the repositories you want to list.
- Labels (optional). Labels are key-value pairs that are used to organize resources.
- Tags (optional). Tags are used to group repositories and other resources across Google Cloud for reporting, auditing, and access control within your Google Cloud organization.
To list repositories, do the following:
In Gemini Cloud Assist chat, enter the following prompt:
List repositories in the location LOCATION
Replace
LOCATION
with the location of your repositories—for example,us-west1
.For example, the following prompt asks Gemini Cloud Assist to list repositories in the region
us-west1
that have the labelenv:dev
:List repositories for us-west1 with the label env:dev
The response includes a list of repositories in the specified location that have the label
env:dev
.
List container images
You can prompt Gemini Cloud Assist to list container images in a Docker format repository in the current project, and filter the response by the following:
- Repository ID (required). The repository ID.
- Location (required). The location of the repository you want to list images from.
- Labels (optional). Labels are key-value pairs that are used to organize resources.
- Docker tags (optional). Docker tags are used when you push or pull an image to a repository to specify the version of an image.
To list your images in a repository, do the following:
In Gemini Cloud Assist chat, enter the following prompt:
List my images for REPOSITORY in LOCATION with the tag TAG
Replace the following:
- REPOSITORY: the repository ID
- LOCATION: the location of the
repository—for example,
us-west1
- TAG: a Docker tag—for example,
latest
The response includes a list of images that have the specified tag, repository, and location.
What's next
- Learn more about Gemini Cloud Assist.