Skip to main content

docker_images

Creates, updates, deletes, gets or lists a docker_images resource.

Overview

Namedocker_images
TypeResource
Idgoogle.artifactregistry.docker_images

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. registry_location, project_id, repository_name and image id forms a unique image name:projects//locations//repositories//dockerImages/. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest.
buildTimestring (google-datetime)The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor.
imageSizeBytesstring (int64)Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.
mediaTypestringMedia type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource.
tagsarrayTags attached to this image.
updateTimestring (google-datetime)Output only. The time when the docker image was last updated.
uploadTimestring (google-datetime)Time the image was uploaded.
uristringRequired. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, repositoriesId, dockerImagesIdGets a docker image.
listselectprojectsId, locationsId, repositoriesIdpageSize, pageToken, orderByLists docker images.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dockerImagesIdstring
locationsIdstring
projectsIdstring
repositoriesIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a docker image.

SELECT
name,
buildTime,
imageSizeBytes,
mediaType,
tags,
updateTime,
uploadTime,
uri
FROM google.artifactregistry.docker_images
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND dockerImagesId = '{{ dockerImagesId }}' -- required;