pub struct BuildContext {
pub context_dir: PathBuf,
pub dockerfile_path: PathBuf,
pub build_args: HashMap<String, String>,
pub tag: String,
pub ltsc: Option<String>,
}Expand description
Inputs to a single build.
One BuildContext per WindowsBuilder::build_skeleton invocation;
holds the on-disk paths the parser reads (Dockerfile + COPY sources)
plus the build-time ARG values and the final image tag.
Fields§
§context_dir: PathBufPath to the build root. Everything COPY/ADD reads is resolved
relative to this directory; the Dockerfile lives here unless
dockerfile_path gives an absolute path.
dockerfile_path: PathBufPath to the Dockerfile, either relative to
context_dir or absolute. The skeleton uses
Dockerfile::parse on the file’s contents.
build_args: HashMap<String, String>Build-time variables (--build-arg KEY=VALUE). Stored verbatim and
applied during Dockerfile variable expansion in later tasks.
tag: StringFinal image tag, e.g. "myapp:latest". Recorded for 4.D’s manifest
emission and 4.E’s push; the 4.A skeleton holds it but does not act
on it.
ltsc: Option<String>Windows LTSC line to target for FROM image rewrites (e.g.
"ltsc2022", "ltsc2025"). When set, the parsed Dockerfile FROM
reference is run through
crate::windows_image_resolver::rewrite_image_for_windows so a
generic Docker Hub reference (ubuntu:24.04, golang:1.24, etc.)
is replaced with the equivalent prebuilt Windows image under
ghcr.io/blackleafdigital/zlayer/.... None means the builder
uses its default (ltsc2022).
Trait Implementations§
Source§impl Clone for BuildContext
impl Clone for BuildContext
Source§fn clone(&self) -> BuildContext
fn clone(&self) -> BuildContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BuildContext
impl RefUnwindSafe for BuildContext
impl Send for BuildContext
impl Sync for BuildContext
impl Unpin for BuildContext
impl UnsafeUnpin for BuildContext
impl UnwindSafe for BuildContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request