Skip to main content

Module docker

Module docker 

Source
Expand description

Runner containers through the Docker Engine API: the connection, container, volume and image requests, and the DockerApi trait the engine and the caches call. It decides nothing about scheduling, and a JIT config only ever reaches a container as a root-only file, never the create request or a log line.

Structs§

Container
A container list found.
Docker
The local Docker Engine.
File
A file files read from a container.
Files
What files read of a directory.
Image
An image images found.
JitConfig
A runner’s just-in-time config from GitHub: credentials, never printed.
RunnerSpec
One runner container: a profile’s image stage with the profile’s limits.
RunnerState
What inspect reports about a runner container.
StartError
A runner start that failed, with the container it may have left: Docker may have made, or even started, it before the request failed, as when its answer is lost.
TaggedImage
An image tagged_images found.
Tty
A container’s terminal, attached once it was created and before it started, so none of its output is missed.
TtySize
A terminal’s size.

Enums§

Error
Generic Docker errors

Constants§

JIT_CONFIG_PATH
Where start puts the just-in-time config in the container: a root-only file, never the create request, which Docker stores and clients may log.
SKIP_SYNCS
What a runner container’s environment holds to have its image answer the runner’s sync calls without syncing ([host] skip_syncs, ADR 0141). runnerd sets it only for an image that carries SKIP_SYNCS_LABEL; an image without runnerd-skip-syncs would ignore it and sync.
SKIP_SYNCS_LABEL
The label of a runner image whose entrypoint runs runnerd-skip-syncs (image/Dockerfile), with the version of what it answers to: 1, SKIP_SYNCS. Runner images before it lack it, and their runners keep their syncs.
VOLATILE_LAYERS_LABEL
The label of a runner image whose entrypoint, asked SKIP_SYNCS, also mounts the slot’s layers volatile, so unmounting them syncs nothing (ADR 0142): 1. The crash guard is the same as for the sync calls, so runnerd asks by SKIP_SYNCS_LABEL alone; this one tells doctor what such a runner skips. Any value reads as volatile layers: a later version of the label still says the image has them.

Traits§

DockerApi
The Docker Engine calls the scheduler and the caches make. Docker is the real one; the engine’s tests use a fake.

Functions§

cpu_shares
The CPU shares of a runner’s container or a record’s shell with cpus CPUs: 1024 a CPU, within the 2 to 262144 Docker takes, which it writes as the container’s cpu.weight. They sit in the slice beside each other, so when the slice’s CPUs are all in use they share them in proportion to their cpus, not evenly; a container with work still gets at most its cpus (nano_cpus). The mirror keeps Docker’s default weight, which every job’s pulls go through, and programs outside the slice share the host’s CPUs with the slice by its own weight (ADR 0079).
create_body
The create-container request for a runner container under an isolation backend.
image_syncs
What an image’s runners skip when runnerd asks them, as its labels say: sync calls and their layers’ unmount syncs, sync calls only, or nothing.
is_being_removed
Whether Docker refused because it is removing the container already, as after a docker rm -f: it says so only in the words of its 409, which a running container’s refusal shares. It may still be stopping.
is_declined
Whether Docker answered that it cannot or will not do what was asked: a 4xx, or 501 for what it lacks, such as the log of a container whose log driver keeps none. Asking again gets the same answer; any other error may not.
is_log_gone
Whether a container’s log is out of reach because it is gone or going. A removal under way can still fail, so this says nothing of whether the container will go.
is_not_found
Whether a Docker error says the container, volume or image does not exist.
is_not_running
Whether Docker refused an exec because the container stopped, as one that ended while it was adopted: its log is read once it is released.
is_unreachable
Whether a Docker error says the Engine did not answer at all: its socket is gone, refuses connections or closed the connection, as while the machine shuts down. Not an answer the Engine gave, nor a timeout, which a busy Engine also gives.
skips_syncs
Whether an image’s labels say it answers SKIP_SYNCS.

Type Aliases§

Output
What a command run in a container prints on stdout, as it prints it.