pub struct Stage {
pub from: FromContext,
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
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
Converts to this type from the input type.
Source§impl Patch<StagePatch> for Stage
impl Patch<StagePatch> for Stage
Source§fn apply(&mut self, patch: StagePatch)
fn apply(&mut self, patch: StagePatch)
Apply a patch
Source§fn into_patch(self) -> StagePatch
fn into_patch(self) -> StagePatch
Returns a patch that when applied turns any struct of the same type into
Self
Source§fn into_patch_by_diff(self, previous_struct: Self) -> StagePatch
fn into_patch_by_diff(self, previous_struct: Self) -> StagePatch
Returns a patch that when applied turns
previous_struct
into Self
Source§fn new_empty_patch() -> StagePatch
fn new_empty_patch() -> StagePatch
Get an empty patch instance
impl StructuralPartialEq for Stage
Auto Trait Implementations§
impl Freeze for Stage
impl RefUnwindSafe for Stage
impl Send for Stage
impl Sync for Stage
impl Unpin for Stage
impl UnwindSafe for Stage
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