pub struct BuildSpec {
pub context_path: String,
pub runtime: Option<String>,
pub build_args: HashMap<String, String>,
pub target: Option<String>,
pub tags: Vec<String>,
pub no_cache: bool,
pub push: bool,
pub platforms: Vec<String>,
}Expand description
Specification sent to the daemon’s POST /api/v1/build/json endpoint to
start an image build against a server-side context path.
Mirrors zlayer_api::handlers::build::BuildRequestWithContext on the
wire; the server-side type is Deserialize-only so we carry a
Serialize mirror here.
Fields§
§context_path: StringPath to the build context on the daemon host. Must already exist.
runtime: Option<String>Runtime template name (e.g. "node20") to use instead of a Dockerfile.
build_args: HashMap<String, String>Build arguments (Dockerfile ARG values).
target: Option<String>Target stage for multi-stage Dockerfiles.
Tags to apply to the resulting image.
no_cache: boolDisable the buildah layer cache.
push: boolPush the resulting image to its registry after the build succeeds.
platforms: Vec<String>Target platforms for a multi-arch manifest-list build (e.g.
["linux/amd64", "linux/arm64"]). More than one builds a manifest
list. Empty = single-arch (host) build.