pub enum BuildNode {
From {
image_ref: String,
display_name: 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: StringThe actual image reference to use. Probably a resolved hash.
display_name: StringWhat user specified initially, such as “alpine”.
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more