pub struct Container {
build_context: PathBuf,
files: Vec<MkFile>,
}
Expand description
A builder for configuring a container to run.
Fields§
§build_context: PathBuf
The host directory that forms the basis of the Docker image.
files: Vec<MkFile>
Files to copy over to the image.
Implementations§
source§impl Container
impl Container
pub fn new(context_dir: &str) -> Container
sourcepub fn launch(self) -> ContainerHandle
pub fn launch(self) -> ContainerHandle
Starts the container.
fn create_container(&self, name: &str)
fn copy_files(&mut self, name: &str)
fn start_container(&self, name: &str)
fn container_inspect(&self, name: &str) -> Value
sourcefn port_mappings(&self, info: &Value) -> HashMap<u16, u16>
fn port_mappings(&self, info: &Value) -> HashMap<u16, u16>
Returns the mapping of container_port->host_port for ports that were exposed with EXPOSE.
fn wait_till_ready(&self, port_mappings: &HashMap<u16, u16>)
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes