Skip to main content

OciImageConfig

Struct OciImageConfig 

Source
pub struct OciImageConfig {
    pub working_dir: Option<String>,
    pub env: Vec<String>,
    pub entrypoint: Option<Vec<String>>,
    pub cmd: Option<Vec<String>>,
    pub user: Option<String>,
    pub exposed_ports: BTreeMap<String, Value>,
    pub volumes: BTreeMap<String, Value>,
    pub labels: BTreeMap<String, String>,
    pub stop_signal: Option<String>,
    pub healthcheck: Option<OciHealthcheck>,
    pub shell: Option<Vec<String>>,
    pub on_build: Vec<String>,
}
Expand description

OCI image config accumulated during instruction execution.

Config-only Dockerfile instructions (WORKDIR / ENV / ENTRYPOINT / CMD / USER / EXPOSE / VOLUME / LABEL / SHELL / STOPSIGNAL / HEALTHCHECK) mutate this struct in-place during 4.C; task 4.D serialises it into the OCI image config blob alongside the layer descriptors on BuildSkeleton.

Field shape matches the OCI image-spec application/vnd.oci.image.config.v1+json config object so 4.D’s emission step is a straight serde_json::to_value over each field without remapping.

Fields§

§working_dir: Option<String>

WorkingDir in the OCI config — the cwd applied to subsequent RUN steps and to the final container’s process. WORKDIR with a relative path resolves against the previous WORKDIR per the Dockerfile spec.

§env: Vec<String>

Env in the OCI config — list of KEY=value entries. Builder-side ENV mutation enforces last-write-wins per key so the vector never grows duplicate KEYs.

§entrypoint: Option<Vec<String>>

Entrypoint in the OCI config. ENTRYPOINT shell form is rewritten to ["cmd", "/c", "<rest>"] for WCOW; exec form is passed through as-is.

§cmd: Option<Vec<String>>

Cmd in the OCI config. Setting ENTRYPOINT resets CMD to None per the Dockerfile spec.

§user: Option<String>

User in the OCI config (e.g. "ContainerUser" or "user:group").

§exposed_ports: BTreeMap<String, Value>

ExposedPorts in the OCI config — map of "<port>/<proto>" → empty object. Stored as BTreeMap so the serialised key order is deterministic across runs.

§volumes: BTreeMap<String, Value>

Volumes in the OCI config — map of <path> → empty object.

§labels: BTreeMap<String, String>

Labels in the OCI config — string→string map. Multiple LABEL lines merge; later LABEL with the same KEY wins.

§stop_signal: Option<String>

StopSignal in the OCI config (e.g. "SIGTERM"). Carried as-is from the STOPSIGNAL instruction.

§healthcheck: Option<OciHealthcheck>

Healthcheck in the OCI config. None means no healthcheck was configured (and the base image’s healthcheck is inherited); HEALTHCHECK NONE sets this to a sentinel OciHealthcheck::disabled.

§shell: Option<Vec<String>>

Shell in the OCI config — list of tokens (["cmd", "/c"] for the default WCOW shell, or a user override via the SHELL instruction).

§on_build: Vec<String>

OnBuild triggers in the OCI config — list of raw Dockerfile instruction text ("COPY . /app" etc.). Only matters when this image is used as a base; the builder itself never re-executes them in the producing build.

Trait Implementations§

Source§

impl Clone for OciImageConfig

Source§

fn clone(&self) -> OciImageConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OciImageConfig

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for OciImageConfig

Source§

fn default() -> OciImageConfig

Returns the “default value” for a type. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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