pub struct Config<T>{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<'de, T> Deserialize<'de> for Config<T>
impl<'de, T> Deserialize<'de> for Config<T>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<ContainerConfig> for Config<String>
impl From<ContainerConfig> for Config<String>
source§fn from(container: ContainerConfig) -> Self
fn from(container: ContainerConfig) -> Self
impl<T> StructuralPartialEq for Config<T>
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> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)