DockerStorageClient#
- class controller.storage.docker.DockerStorageClient(*, credentials_path, http_client, logger)#
Bases:
objectClient to query the Docker API for image information.
- Parameters:
credentials_path (
Path) – Path to a Docker credentials store.http_client (
AsyncClient) – Client to use to make requests.logger (
BoundLogger) – Logger for log messages.
Methods Summary
get_image_digest(config, tag)Get the digest associated with an image tag.
list_tags(config)List tags for a given registry and repository.
Methods Documentation
- async get_image_digest(config, tag)#
Get the digest associated with an image tag.
- Parameters:
config (
DockerSourceOptions) – Configuration for the registry and repository to use.tag (
str) – The tag to inspect.
- Returns:
The digest, such as
sha256:abcdef.- Return type:
- Raises:
DockerRegistryError – Unable to retrieve the digest from the Docker Registry.
- async list_tags(config)#
List tags for a given registry and repository.
This is not comprehensive, because we filter out platform-specific tags that have matching base tags.
- Parameters:
config (
DockerSourceOptions) – Configuration for the registry and repository to use.- Returns:
All the non-platform-specific tags found for that repository.
- Return type: