docker
Docker settings for building and running analysis images.
DockerSettings
pydantic-model
¶
Bases: BaseModel
Docker settings for building the analysis image.
Fields:
-
image(str) -
tag(str) -
digest(str | None) -
base_command(str) -
relative_build_path(str | Path) -
remote_https_url(HttpUrl | None) -
exit_codes(dict[int, ExitCodeMeaning]) -
ssh_key(str | None)
Validators:
base_command = ''
pydantic-field
¶
The base command without parameters to run the analysis in the Docker container. Defaults to an empty string assuming an entry is set in the Dockerfile.
digest = None
pydantic-field
¶
Optional content digest of the Docker image, e.g. 'sha256:abc…'. When set, the image reference used to run the analysis pins these exact bytes ('image:tag@sha256:…'): the tag remains the human-readable version label, while the digest is what the container runtime resolves — a re-pushed tag can no longer change what runs. When unset, the tag alone selects the image.
exit_codes
pydantic-field
¶
What the image's exit codes other than 0 mean: for each, the failure it stands for and, optionally, the sentence its user is shown. An exit code it does not declare reads as an unclassified failure. Codes run from 1 to 255; 137, a container killed for its memory, is the platform's to read. Left out when none is declared.
full_image_name
property
¶
Return the tag form of the image name ('image:tag').
Deliberately digest-free: registry APIs and humans address images by
tag. Use :attr:pinned_image_reference for the reference a container
runtime should run.
image
pydantic-field
¶
The name of the Docker image.
pinned_image_reference
property
¶
Return the reference to run, digest-pinned when a digest is declared.
'image:tag@digest' with a digest, else 'image:tag'. 'NAME:TAG@DIGEST' is valid for every mainstream runtime; the runtime resolves the digest and the tag rides along as documentation.
relative_build_path = '.'
pydantic-field
¶
The relative path to the Docker build context. This path is relative to the root of the repository. Default is the root of the repository.
remote_https_url = None
pydantic-field
¶
The HTTPS URL of the remote repository. This URL is used to clone the repository and build the Docker image. If the repository is private, the an SSH equivalent URL is used instead for which a valid SSH key must be registered with the ssh-agent.
ssh_key = None
pydantic-field
¶
The SSH key to use to clone the repository if the repository is private. The SSH key must be a valid private key in the OpenSSH format. If the repository is public, this field can be left empty.
ssh_url
property
¶
Return the SSH URL of the source repository, or None when none is declared.
tag
pydantic-field
¶
The tag of the Docker image, e.g. 'latest' or '1.0'.
exit_codes_in_range(exit_codes)
pydantic-validator
¶
Refuse an exit code outside 1 to 255 or one the platform reads, and keep one order.
The order is fixed so two configurations that declare the same codes hash the same.
validate_remote_https_url(v)
pydantic-validator
¶
Validate the remote, when one is declared, as a HTTPS URL.
The field is optional; an explicit null (which is what a stored or
author-facing configuration without a source repository carries) passes
through untouched.
ExitCodeMeaning
pydantic-model
¶
Bases: BaseModel
What one of an analysis image's exit codes means, as its user is told.
Config:
frozen:Trueextra:forbid
Fields:
-
failure_code(ErrorCode) -
message(str | None)
Validators:
failure_code
pydantic-field
¶
The failure the exit code stands for: a reason about the recording (too short, the channels, a sampling rate, unreadable, or outside what the analysis accepts), about what the analysis was asked to do, or the unclassified failure.
message = None
pydantic-field
¶
The sentence the user is shown, in British English, in place of the platform's own sentence for the failure code. It names what the user can change, and holds nothing from the analysis's log.
declarable(code)
pydantic-validator
¶
Refuse a failure the platform finds itself, or any other kind of code.