Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

container

Configuration of a container resource backed by a registry image.

Corresponds to the container: key in a resource entry. The runtime pulls image, applies the declared port mappings, mounts volumes, and injects environment variables before starting the container.

See [crate::DockerfileConfig] for the locally-built equivalent.

FieldTypeRequiredDefaultDescription
commandCommandnoOptional entrypoint override. See [Command] for the two accepted forms (string or argument list).
depends_onarray of stringnoNames of other resources this container must wait for before starting. Validated by [crate::Manifest::validate].
envmap of stringnoEnvironment variables injected into the container at startup. Values are interpolated: ${env.NAME} and ${resources.name.property} expressions are resolved at runtime.
healthcheckHealthchecknoOptional healthcheck. Overrides whatever is baked into the image. See [Healthcheck] for field semantics and defaults.
imagestringyesFull image reference including the tag, e.g. "nginx:1.25-alpine".
portsarray of PortMappingnoPort mappings between the host and the container. Each element is a [PortMapping]: either a bare container port (mirrored on the host) or a full "host:container" string.
volumesarray of stringnoVolume mappings in "host:container" or "named:container" form. Relative host paths (starting with .) are resolved against the manifest directory by [crate::Manifest::resolve_host_volume_paths] before they reach the runtime.
working_dirstringnoOptional working directory override inside the container.