pub struct Config<T>where
T: AsRef<str> + Eq + Hash,{Show 25 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 args_escaped: Option<bool>,
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 entrypoint: Option<Vec<T>>,
pub image: Option<T>,
pub labels: Option<HashMap<T, T>>,
pub volumes: Option<HashMap<T, HashMap<(), ()>>>,
pub working_dir: Option<T>,
pub network_disabled: Option<bool>,
pub on_build: Option<Vec<T>>,
pub mac_address: Option<T>,
pub exposed_ports: Option<HashMap<T, HashMap<(), ()>>>,
pub stop_signal: Option<T>,
pub stop_timeout: Option<isize>,
pub host_config: Option<HostConfig<T>>,
pub networking_config: Option<NetworkingConfig>,
}
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
.
args_escaped: Option<bool>
Command is already escaped (Windows only).
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.
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
).
image: Option<T>
The name of the image to use when creating the container.
labels: Option<HashMap<T, T>>
User-defined key/value metadata.
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.
network_disabled: Option<bool>
Disable networking for the container.
on_build: Option<Vec<T>>
ONBUILD
metadata that were defined in the image’s Dockerfile
.
mac_address: Option<T>
MAC address of the container.
exposed_ports: Option<HashMap<T, HashMap<(), ()>>>
An object mapping ports to an empty object in the form:
{"<port>/<tcp|udp|sctp>": {}}
stop_signal: Option<T>
Signal to stop a container as a string or unsigned integer.
stop_timeout: Option<isize>
Timeout to stop a container in seconds.
host_config: Option<HostConfig<T>>
Container configuration that depends on the host we are running on.
networking_config: Option<NetworkingConfig>
This container’s networking configuration.