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
FromScratch
Fields
Run
CopyFromImage
CopyFromLocal
SetWorkdir
SetEntrypoint
SetCmd
SetLabel
Merge(MergeNode)
SetEnv
AppendEnvValue
SetUser
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BuildNode
impl<'de> Deserialize<'de> for BuildNode
Source§fn 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 Freeze for BuildNode
impl RefUnwindSafe for BuildNode
impl Send for BuildNode
impl Sync for BuildNode
impl Unpin for BuildNode
impl UnwindSafe for BuildNode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn 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
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn 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