Skip to main content

BuildSkeleton

Struct BuildSkeleton 

Source
pub struct BuildSkeleton {
    pub parsed_dockerfile: Dockerfile,
    pub base_layers: Vec<LayerRef>,
    pub base_manifest: BaseImageManifest,
    pub working_layer_chain_dir: PathBuf,
    pub working_chain: Vec<WindowsLayerEntry>,
    pub image_config: OciImageConfig,
    pub instruction_log: Vec<ExecutedInstruction>,
    pub provisioned_toolchain_language: Option<String>,
}
Expand description

Output of WindowsBuilder::build_skeleton — the parsed Dockerfile plus the materialised base layer chain plus the resolved base manifest.

Consumed by Phase 4 follow-up tasks:

  • 4.B (RUN, this task) iterates parsed_dockerfile.stages[0].instructions and for each Instruction::Run spawns an HCS compute system attached to the working chain stored in working_chain, captures the diff via wclayer::export_layer, and appends a new LayerRef to base_layers plus a new WindowsLayerEntry to working_chain.
  • 4.C (COPY/ADD) writes context files into the working scratch layer before the next 4.B commit.
  • 4.D (manifest) emits the final OCI image with os: "windows", os.version from base_manifest, and the accumulated base_layers + post-4.B layers chain.
  • 4.E (push) pipes the 4.D manifest into the registry client.

Fields§

§parsed_dockerfile: Dockerfile

Parsed Dockerfile — parsed_dockerfile.stages[0] is the single stage supported by the skeleton.

§base_layers: Vec<LayerRef>

Base image layers in base-first order (matching OCI manifest order). Task 4.B appends post-RUN layers to the end of this vector.

§base_manifest: BaseImageManifest

Manifest metadata from the resolved base image.

§working_layer_chain_dir: PathBuf

On-disk path to the working layer chain root. On Windows this is the directory passed to [zlayer_agent::windows::unpacker::unpack_windows_image]; on other hosts this field is the <cache_dir>/<build_id>/unpacked/ path the skeleton would have used had the build proceeded. Each post-RUN read-only layer is staged as a subdirectory here.

§working_chain: Vec<WindowsLayerEntry>

Materialised layers in base-first order. The HCS storage filter consumes the reversed (child-to-parent) view; helpers in this module do the reversal at the point of use. Populated on Windows by build_skeleton from the unpacker output and extended by each successful RUN step.

§image_config: OciImageConfig

OCI image config accumulated by config-only Dockerfile instructions (WORKDIR / ENV / ENTRYPOINT / CMD / USER / EXPOSE / VOLUME / LABEL / SHELL / STOPSIGNAL / HEALTHCHECK / ONBUILD). Task 4.D serialises this into the image config blob.

§instruction_log: Vec<ExecutedInstruction>

Per-instruction execution log in build order. The first entry is the FROM instruction (recorded by WindowsBuilder::build_skeleton); subsequent entries are appended by WindowsBuilder::execute_instruction in the order it is called. Task 4.D (WindowsBuilder::emit_image) consumes this to emit the OCI image config history array.

§provisioned_toolchain_language: Option<String>

Provisioned toolchain language detected for this base image, e.g. "go", "node", "rust", "python", or None if the base does not carry a prebuilt language toolchain. Populated by WindowsBuilder::build_image_for_backend right after build_skeleton from [crate::windows_toolchain::detect_toolchain]. Threaded into the crate::buildah::DockerfileTranslator on each RUN so package-manager translation can skip system packages that the provisioned toolchain already supplies (e.g. dropping apt install nodejs when the image already ships a Node toolchain). None for everything that goes through WindowsBuilder::build_skeleton / WindowsBuilder::build_and_push — those paths predate the toolchain hook and stay on the translator’s default behaviour.

Trait Implementations§

Source§

impl Debug for BuildSkeleton

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more