pub enum Instruction {
Show 19 variants
From(BaseImage),
Run(RunArgs),
Copy(CopyArgs, CopyFlags),
Add(AddArgs, AddFlags),
Env(Vec<(String, String)>),
Label(Vec<(String, String)>),
Expose(Vec<Port>),
Arg(String, Option<String>),
Entrypoint(Arguments),
Cmd(Arguments),
Shell(Arguments),
User(String),
Workdir(String),
Volume(String),
Maintainer(String),
Healthcheck(HealthCheck),
OnBuild(Box<Instruction>),
Stopsignal(String),
Comment(String),
}Expand description
Dockerfile instructions.
Variants§
From(BaseImage)
FROM instruction
Run(RunArgs)
RUN instruction
Copy(CopyArgs, CopyFlags)
COPY instruction
Add(AddArgs, AddFlags)
ADD instruction
Env(Vec<(String, String)>)
ENV instruction
Label(Vec<(String, String)>)
LABEL instruction
Expose(Vec<Port>)
EXPOSE instruction
Arg(String, Option<String>)
ARG instruction
Entrypoint(Arguments)
ENTRYPOINT instruction
Cmd(Arguments)
CMD instruction
Shell(Arguments)
SHELL instruction
User(String)
USER instruction
Workdir(String)
WORKDIR instruction
Volume(String)
VOLUME instruction
Maintainer(String)
MAINTAINER instruction (deprecated)
Healthcheck(HealthCheck)
HEALTHCHECK instruction
OnBuild(Box<Instruction>)
ONBUILD instruction (wraps another instruction)
Stopsignal(String)
STOPSIGNAL instruction
Comment(String)
Comment line
Implementations§
Source§impl Instruction
impl Instruction
Sourcepub fn is_onbuild(&self) -> bool
pub fn is_onbuild(&self) -> bool
Check if this is an ONBUILD instruction.
Sourcepub fn unwrap_onbuild(&self) -> Option<&Instruction>
pub fn unwrap_onbuild(&self) -> Option<&Instruction>
Get the wrapped instruction if this is ONBUILD.
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.