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

scratch_ref: Option<String>

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

Run

Fields

parent: NodeId
command: String
cwd: 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>

SetLabel

Fields

parent: NodeId
label: String
value: String

Merge(MergeNode)

SetEnv

Fields

parent: NodeId
key: String
value: String

AppendEnvValue

Fields

parent: NodeId
key: String
value: String

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.