jina.docker.checker

Module for validation functions.

jina.docker.checker.check_registry(registry, name, repo_prefix)[source]

Check registry image is valid within this registry.

Parameters
  • registry – the registry URL

  • name – the name of the image

  • repo_prefix – the prefix of the repo

Return type

None

jina.docker.checker.check_name(name)[source]

Check the name is valid against the regex rule.

Parameters

name – the name

Return type

None

jina.docker.checker.check_version(version)[source]

Check the version against the regex.

Parameters

version – the version

Return type

None

jina.docker.checker.check_image_name(image_name)[source]

Check the image name against the image tag regex.

Parameters

image_name – the name of the image

Return type

None

jina.docker.checker.check_platform(platform_names)[source]

Check the platform against the list of supported platforms.

Parameters

platform_names – the name of the platforms

Return type

None

jina.docker.checker.check_license(lic)[source]

Check the license is a valid OS supported license.

Parameters

lic – the license

Return type

str

Returns

the full name of the license

jina.docker.checker.check_image_type(image_type)[source]

Check the image type is valid.

Parameters

image_type – the type of image

Return type

None

jina.docker.checker.remove_control_characters(s)[source]

Remove control characters.

Parameters

s – the string to check

Return type

str

Returns

the cleaned string

jina.docker.checker.safe_url_name(url)[source]

Clean the url.

Parameters

url – the url input

Return type

str

Returns

the sanitized url

jina.docker.checker.get_exist_path(directory, filename)[source]

Check if path exists within the directory.

Parameters
  • directory – the directory within which to check

  • filename – the filename which we check

Return type

Optional[str]

Returns

if exists, the full path

jina.docker.checker.get_summary_path(image_name)[source]

Get full path to summary.

Parameters

image_name (str) – the name of the image

Return type

str

Returns

the full path to the summary JSON file of the image

jina.docker.checker.is_error_message(s)[source]

Check if the string matches an exception regex.

Parameters

s – the string to check

Return type

bool

Returns

whether or not it matches