Skip to content

Kathara.manager.docker.DockerImage

Tommaso Caiazzi edited this page Mar 18, 2024 · 11 revisions

module Kathara.manager.docker.DockerImage


class DockerImage

Class responsible for interacting with Docker Images.

method DockerImage.__init__

__init__(client: docker.client.DockerClient) → None

method DockerImage.check

check(image_name: str) → None

Check the existence of the specified image.

Args:

  • image_name (str): The name of a Docker Image.

Returns: None

Raises:

  • ConnectionError: If there is a connection error while pulling the Docker image from Docker Hub.
  • DockerImageNotFoundError: If the Docker image is not available neither on Docker Hub nor in local repository.

method DockerImage.check_for_updates

check_for_updates(image_name: str) → None

Update the specified image.

Args:

  • image_name (str): The name of a Docker Image.

Returns: None


method DockerImage.check_from_list

check_from_list(images: Union[List[str], Set[str]]) → None

Check a list of specified images.

Args:

  • images (Union[List[str], Set[str]]): A list of Docker images name to pull.

Returns: None


method DockerImage.get_local

get_local(image_name: str) → Image

Return the specified Docker Image.

Args:

  • image_name (str): The name of a Docker Image.

Returns:

  • docker.models.images.Image: A Docker Image

method DockerImage.get_remote

get_remote(image_name: str) → RegistryData

Gets the registry data for an image.

Args:

  • image_name (str): The name of the image.

Returns:

  • docker.models.images.RegistryData: The data object.

Raises:

  • docker.errors.APIError: If the server returns an error.

method DockerImage.pull

pull(image_name: str) → None

Pull the specified Docker Image.

Args:

  • image_name (str): The name of a Docker Image.

Returns: None


This file was automatically generated via lazydocs.

Clone this wiki locally