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
impl Clone for OciImageConfig
Source§fn clone(&self) -> OciImageConfig
fn clone(&self) -> OciImageConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OciImageConfig
impl Debug for OciImageConfig
Source§impl Default for OciImageConfig
impl Default for OciImageConfig
Source§fn default() -> OciImageConfig
fn default() -> OciImageConfig
Auto Trait Implementations§
impl Freeze for OciImageConfig
impl RefUnwindSafe for OciImageConfig
impl Send for OciImageConfig
impl Sync for OciImageConfig
impl Unpin for OciImageConfig
impl UnsafeUnpin for OciImageConfig
impl UnwindSafe for OciImageConfig
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