DockerReference

class controller.models.domain.docker.DockerReference(registry, repository, tag, digest)

Bases: object

Parses a Docker reference.

Parameters:

Attributes Summary

digest

Digest, if present.

registry

Registry (Docker API server) hosting the image.

repository

Repository of images (for example, lsstsqre/sciplat-lab).

tag

Tag, if present.

Methods Summary

from_str(reference)

Parse a Docker reference string into its components.

Attributes Documentation

digest: str | None = <dataclasses._MISSING_TYPE object>

Digest, if present.

registry: str = <dataclasses._MISSING_TYPE object>

Registry (Docker API server) hosting the image.

repository: str = <dataclasses._MISSING_TYPE object>

Repository of images (for example, lsstsqre/sciplat-lab).

tag: str | None = <dataclasses._MISSING_TYPE object>

Tag, if present.

Methods Documentation

classmethod from_str(reference)

Parse a Docker reference string into its components.

Parameters:

reference (str) – Reference string.

Returns:

Resulting reference.

Return type:

DockerReference

Raises:

ValueError – The reference could not be parsed. (Uses ValueError so that this can be used as a Pydantic validator.)