Struct bollard::container::Config

source ·
pub struct Config<T>
where T: Into<String> + Eq + Hash,
{
Show 27 fields pub hostname: Option<T>, pub domainname: Option<T>, pub user: Option<T>, pub attach_stdin: Option<bool>, pub attach_stdout: Option<bool>, pub attach_stderr: Option<bool>, pub exposed_ports: Option<HashMap<T, HashMap<(), ()>>>, pub tty: Option<bool>, pub open_stdin: Option<bool>, pub stdin_once: Option<bool>, pub env: Option<Vec<T>>, pub cmd: Option<Vec<T>>, pub healthcheck: Option<HealthConfig>, pub args_escaped: Option<bool>, pub image: Option<T>, pub volumes: Option<HashMap<T, HashMap<(), ()>>>, pub working_dir: Option<T>, pub entrypoint: Option<Vec<T>>, pub network_disabled: Option<bool>, pub mac_address: Option<T>, pub on_build: Option<Vec<T>>, pub labels: Option<HashMap<T, T>>, pub stop_signal: Option<T>, pub stop_timeout: Option<i64>, pub shell: Option<Vec<T>>, pub host_config: Option<HostConfig>, pub networking_config: Option<NetworkingConfig<T>>,
}
Expand description

Container to create.

Fields§

§hostname: Option<T>

The hostname to use for the container, as a valid RFC 1123 hostname.

§domainname: Option<T>

The domain name to use for the container.

§user: Option<T>

The user that commands are run as inside the container.

§attach_stdin: Option<bool>

Whether to attach to stdin.

§attach_stdout: Option<bool>

Whether to attach to stdout.

§attach_stderr: Option<bool>

Whether to attach to stderr.

§exposed_ports: Option<HashMap<T, HashMap<(), ()>>>

An object mapping ports to an empty object in the form: {\"<port>/<tcp|udp|sctp>\": {}}

§tty: Option<bool>

Attach standard streams to a TTY, including stdin if it is not closed.

§open_stdin: Option<bool>

Open stdin

§stdin_once: Option<bool>

Close stdin after one attached client disconnects

§env: Option<Vec<T>>

A list of environment variables to set inside the container in the form [\"VAR=value\", ...]. A variable without = is removed from the environment, rather than to have an empty value.

§cmd: Option<Vec<T>>

Command to run specified as a string or an array of strings.

§healthcheck: Option<HealthConfig>

A TEST to perform TO Check that the container is healthy.

§args_escaped: Option<bool>

Command is already escaped (Windows only)

§image: Option<T>

The name of the image to use when creating the container

§volumes: Option<HashMap<T, HashMap<(), ()>>>

An object mapping mount point paths inside the container to empty objects.

§working_dir: Option<T>

The working directory for commands to run in.

§entrypoint: Option<Vec<T>>

The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string ([\"\"]) then the entry point is reset to system default (i.e., the entry point used by docker when there is no ENTRYPOINT instruction in the Dockerfile).

§network_disabled: Option<bool>

Disable networking for the container.

§mac_address: Option<T>

MAC address of the container.

§on_build: Option<Vec<T>>

ONBUILD metadata that were defined in the image’s Dockerfile.

§labels: Option<HashMap<T, T>>

User-defined key/value metadata.

§stop_signal: Option<T>

Signal to stop a container as a string or unsigned integer.

§stop_timeout: Option<i64>

Timeout to stop a container in seconds.

§shell: Option<Vec<T>>

Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

§host_config: Option<HostConfig>

Container configuration that depends on the host we are running on. Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

§networking_config: Option<NetworkingConfig<T>>

This container’s networking configuration.

Trait Implementations§

source§

impl<T> Clone for Config<T>
where T: Into<String> + Eq + Hash + Clone,

source§

fn clone(&self) -> Config<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Config<T>
where T: Into<String> + Eq + Hash + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for Config<T>
where T: Into<String> + Eq + Hash + Default,

source§

fn default() -> Config<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for Config<T>
where T: Into<String> + Eq + Hash + Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<ContainerConfig> for Config<String>

source§

fn from(container: ContainerConfig) -> Self

Converts to this type from the input type.
source§

impl<T> PartialEq for Config<T>
where T: Into<String> + Eq + Hash + PartialEq,

source§

fn eq(&self, other: &Config<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for Config<T>
where T: Into<String> + Eq + Hash + Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T> StructuralPartialEq for Config<T>
where T: Into<String> + Eq + Hash,

Auto Trait Implementations§

§

impl<T> Freeze for Config<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Config<T>
where T: RefUnwindSafe,

§

impl<T> Send for Config<T>
where T: Send,

§

impl<T> Sync for Config<T>
where T: Sync,

§

impl<T> Unpin for Config<T>
where T: Unpin,

§

impl<T> UnwindSafe for Config<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,