[−][src]Struct harbourmaster::ContainerBuilder
Builder struct for fine control over the construction of a Container.
see Container::builder() for example.
Methods
impl ContainerBuilder
[src]
pub fn tag(self, tag: impl Into<String>) -> Self
[src]
Set the tag of the docker image. defaults to "latest".
pub fn client(self, client: impl Into<Client>) -> Self
[src]
Use an alternative Docker Client to manipulate the Container.ContainerBuilder
This defaults to a globally shared Docker client at the default socket. This should be fine in just about all cases.
pub fn name(self, name: impl Into<String>) -> Self
[src]
Set the name of the docker container.
pub fn slug_length(self, length: usize) -> Self
[src]
Optionally add an alphanumeric 'slug' to the container name.
In the form "[container name]_XXXX" where XXXX represents the slug.
Useful if you're creating a job lot of containers and you want them to have human readable names, but no collisions.
pub fn expose(self, src_port: u16, host_port: u16, protocol: Protocol) -> Self
[src]
Expose a port from the container to the host.
Can be called multiple times to expose multiple ports.
pub fn pull_on_build(self, pull: bool) -> Self
[src]
Set whether the client will attempt to pull the image from the internet before running the container. defaults to false.
pub fn build(self) -> impl Future<Item = Container, Error = Error>
[src]
Consume the ContainerBuilder and return a future which resolves to the Container (or an error!).
Auto Trait Implementations
impl Send for ContainerBuilder
impl Sync for ContainerBuilder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,