pub enum BuildNode {
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>,
},
SetLabel {
parent: NodeId,
label: String,
value: String,
},
Merge(MergeNode),
SetEnv {
parent: NodeId,
key: String,
value: String,
},
AppendEnvValue {
parent: NodeId,
key: String,
value: 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
Run
CopyFromImage
CopyFromLocal
SetWorkdir
SetEntrypoint
SetLabel
Merge(MergeNode)
SetEnv
AppendEnvValue
Trait Implementations
sourceimpl<'de> Deserialize<'de> for BuildNode
impl<'de> Deserialize<'de> for BuildNode
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for BuildNode
impl Send for BuildNode
impl Sync for BuildNode
impl Unpin for BuildNode
impl UnwindSafe for BuildNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
sourcefn extract_context(self, _original_input: I)
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
sourceimpl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
sourcefn recreate_context(_original_input: I, tail: I) -> I
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more