Enum BuildNode

Source
pub enum BuildNode {
Show 13 variants From { image_ref: String, display_name: String, }, FromScratch { scratch_ref: Option<String>, }, Run { parent: NodeId, command: String, cwd: String, additional_envs: HashMap<String, String>, }, CopyFromImage { parent: NodeId, src_image: NodeId, src_path: String, dst_path: String, }, CopyFromLocal { parent: NodeId, src_path: String, dst_path: String, }, SetWorkdir { parent: NodeId, new_workdir: String, }, SetEntrypoint { parent: NodeId, new_entrypoint: Vec<String>, }, SetCmd { parent: NodeId, new_cmd: Vec<String>, }, SetLabel { parent: NodeId, label: String, value: String, }, Merge(MergeNode), SetEnv { parent: NodeId, key: String, value: String, }, AppendEnvValue { parent: NodeId, key: String, value: String, }, SetUser { parent: NodeId, user: String, },
}
Expand description

Represent one operation, such as RUN or FROM.

Think of it as one line of a Dockerfile, or one node in the buildkit graph.

§Paths

All the paths in this structure can either be absolute or relative path. In the case of relative paths, they are ALWAYS relative to the working directory of the parent image (as stored in the image config). Translators from this to e.g. buildkit LLB should resolve the paths as necessary.

In the case of copy, src_path and dst_path should be resolved relative to the source image’s workdir and the destination (parent) image’s workdir, respectively.

TODO: add caching control

Variants§

§

From

Fields

§image_ref: String

The actual image reference to use. Probably a resolved hash.

§display_name: String

What user specified initially, such as “alpine”.

§

FromScratch

Fields

§scratch_ref: Option<String>

A hack, inserted by buildkit.rs See buildkit_frontend.rs for documentation

§

Run

Fields

§parent: NodeId
§command: String
§additional_envs: HashMap<String, String>
§

CopyFromImage

Fields

§parent: NodeId
§src_image: NodeId
§src_path: String
§dst_path: String
§

CopyFromLocal

Fields

§parent: NodeId
§src_path: String
§dst_path: String
§

SetWorkdir

Fields

§parent: NodeId
§new_workdir: String
§

SetEntrypoint

Fields

§parent: NodeId
§new_entrypoint: Vec<String>
§

SetCmd

Fields

§parent: NodeId
§new_cmd: Vec<String>
§

SetLabel

Fields

§parent: NodeId
§label: String
§value: String
§

Merge(MergeNode)

§

SetEnv

Fields

§parent: NodeId
§value: String
§

AppendEnvValue

Fields

§parent: NodeId
§value: String
§

SetUser

Fields

§parent: NodeId
§user: String

Trait Implementations§

Source§

impl Clone for BuildNode

Source§

fn clone(&self) -> BuildNode

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildNode

Source§

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

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

impl<'de> Deserialize<'de> for BuildNode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for BuildNode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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<I, T> ExtractContext<I, ()> for T

Source§

fn extract_context(self, _original_input: I)

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<I> RecreateContext<I> for I

Source§

fn recreate_context(_original_input: I, tail: I) -> I

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,