pub struct Stage {
pub from: FromContext,
pub label: HashMap<String, String>,
pub user: Option<User>,
pub workdir: Option<String>,
pub arg: HashMap<String, String>,
pub env: HashMap<String, String>,
pub copy: Vec<CopyResource>,
pub root: Option<Run>,
pub run: Run,
}
Expand description
Represents a Dockerfile stage
Fields§
§from: FromContext
The base of the stage See https://docs.docker.com/reference/dockerfile/#from
label: HashMap<String, String>
Add metadata to an image See https://docs.docker.com/reference/dockerfile/#label
user: Option<User>
The user and group of the stage See https://docs.docker.com/reference/dockerfile/#user
workdir: Option<String>
The working directory of the stage See https://docs.docker.com/reference/dockerfile/#workdir
arg: HashMap<String, String>
The build args that can be used in the stage See https://docs.docker.com/reference/dockerfile/#arg
env: HashMap<String, String>
The environment variables of the stage See https://docs.docker.com/reference/dockerfile/#env
copy: Vec<CopyResource>
The copy instructions of the stage See https://docs.docker.com/reference/dockerfile/#copy and https://docs.docker.com/reference/dockerfile/#add
root: Option<Run>
The run instructions of the stage as root user
run: Run
The run instructions of the stage See https://docs.docker.com/reference/dockerfile/#run
Implementations§
Source§impl Stage
impl Stage
pub fn from(&self, context: &GenerationContext) -> FromContext
pub fn user(&self, context: &GenerationContext) -> Option<User>
Trait Implementations§
Source§impl From<StagePatch> for Stage
impl From<StagePatch> for Stage
Source§fn from(value: StagePatch) -> Self
fn from(value: StagePatch) -> Self
Source§impl Patch<StagePatch> for Stage
impl Patch<StagePatch> for Stage
Source§fn apply(&mut self, patch: StagePatch)
fn apply(&mut self, patch: StagePatch)
Source§fn into_patch(self) -> StagePatch
fn into_patch(self) -> StagePatch
Self
Source§fn into_patch_by_diff(self, previous_struct: Self) -> StagePatch
fn into_patch_by_diff(self, previous_struct: Self) -> StagePatch
previous_struct
into Self