DockerImagesManager#
- class nublado.services.images.DockerImagesManager(docker_client, logger)#
Bases:
ImagesManager[DockerSource]Manage Nublado images using the Docker API.
- Parameters:
docker_client (
DockerStorageClient) – Docker client.logger (
BoundLogger) – Logger to use.
Methods Summary
delete_tags(config, tags)Delete the given tags.
list_tags(config)List the available image tags in the repository.
prune_images(config, policy, *[, dry_run])Prune the images excluded by a filter policy.
Methods Documentation
- async delete_tags(config, tags)#
Delete the given tags.
The underlying image will be deleted, even if the image also has other tags, so this will also delete other tags attached to the same image. Use with caution for images that may be tagged with
recommendedor other alias tags.- Parameters:
config (
DockerSource) – Configuration for the repository.
- Return type:
- async list_tags(config)#
List the available image tags in the repository.
- Parameters:
config (
DockerSource) – Configuration for the repository.- Returns:
Set of image tags.
- Return type:
- async prune_images(config, policy, *, dry_run=True)#
Prune the images excluded by a filter policy.
The images that are not accepted by the filter policy will be deleted, at least to the extent that is possible in the target image registry.
- Parameters:
config (
DockerSource) – Configuration for the repository.policy (
ImageFilterPolicy) – Image filter policy describing what images to retain.dry_run (
bool, default:True) – IfTrue, do not delete the images, only return which images would be deleted.
- Returns:
Tags of deleted images, or images that would be deleted if
dry_runisTrue, in standard sorted order.- Return type: