DockerStorageClient¶
- class controller.storage.docker.DockerStorageClient(*, credentials_path, http_client, logger)¶
Bases:
object
Client 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 all the 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 all the tags for a given registry and repository.
- Parameters:
config (
DockerSourceOptions
) – Configuration for the registry and repository to use.- Returns:
All the tags found for that repository.
- Return type: