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

dockerfile

Configuration of a dockerfile resource built locally before being run.

The runtime performs a docker build in context, then starts the resulting image as it would for a [crate::ContainerConfig].

FieldTypeRequiredDefaultDescription
build_argsmap of stringnoBuild-time ARG values passed to docker build --build-arg.
commandCommandnoOptional entrypoint override. See [Command] for accepted forms.
contextstringyesBuild context path, relative to the manifest file. Resolved to an absolute path by [crate::Manifest::resolve_host_volume_paths] before it is handed to the runtime.
depends_onarray of stringnoNames of other resources this build must wait for before starting. Validated by [crate::Manifest::validate].
dockerfilestringno"Dockerfile"Path to the Dockerfile within context. Defaults to "Dockerfile".
envmap of stringnoEnvironment variables injected into the container at runtime. Values support ${env.NAME} and ${resources.name.property} interpolation.
healthcheckHealthchecknoOptional healthcheck override. See [Healthcheck] for field semantics.
portsarray of PortMappingnoPort mappings between the host and the container. See [PortMapping].
targetstringnoMulti-stage build target passed to docker build --target.
volumesarray of stringnoVolume mappings in "host:container" or "named:container" form. Relative host paths are resolved by [crate::Manifest::resolve_host_volume_paths].
working_dirstringnoOptional working directory override inside the container.