Struct docker_api::models::TaskSpecContainerSpecInlineItem
source · [−]pub struct TaskSpecContainerSpecInlineItem {Show 27 fields
pub args: Option<Vec<String, Global>>,
pub capability_add: Option<Vec<String, Global>>,
pub capability_drop: Option<Vec<String, Global>>,
pub command: Option<Vec<String, Global>>,
pub configs: Option<Vec<TaskSpecContainerSpecInlineItemConfigsInlineItem, Global>>,
pub dns_config: Option<TaskSpecContainerSpecInlineItemDnsConfigInlineItem>,
pub dir: Option<String>,
pub env: Option<Vec<String, Global>>,
pub groups: Option<Vec<String, Global>>,
pub health_check: Option<HealthConfig>,
pub hostname: Option<String>,
pub hosts: Option<Vec<String, Global>>,
pub image: Option<String>,
pub init: Option<bool>,
pub isolation: Option<String>,
pub labels: Option<HashMap<String, String, RandomState>>,
pub mounts: Option<Vec<Mount, Global>>,
pub open_stdin: Option<bool>,
pub privileges: Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItem>,
pub read_only: Option<bool>,
pub secrets: Option<Vec<TaskSpecContainerSpecInlineItemSecretsInlineItem, Global>>,
pub stop_grace_period: Option<i64>,
pub stop_signal: Option<String>,
pub sysctls: Option<HashMap<String, String, RandomState>>,
pub tty: Option<bool>,
pub ulimits: Option<Vec<TaskSpecContainerSpecInlineItemUlimitsInlineItem, Global>>,
pub user: Option<String>,
}
Expand description
Container spec for the service.
Note: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. PluginSpec is only used when the Runtime field is set to
plugin
. NetworkAttachmentSpec is used when the Runtime field is set toattachment
.
Fields
args: Option<Vec<String, Global>>
Arguments to the command.
capability_add: Option<Vec<String, Global>>
A list of kernel capabilities to add to the default set for the container.
capability_drop: Option<Vec<String, Global>>
A list of kernel capabilities to drop from the default set for the container.
command: Option<Vec<String, Global>>
The command to be run in the image.
configs: Option<Vec<TaskSpecContainerSpecInlineItemConfigsInlineItem, Global>>
Configs contains references to zero or more configs that will be exposed to the service.
dns_config: Option<TaskSpecContainerSpecInlineItemDnsConfigInlineItem>
Specification for DNS related configurations in resolver configuration
file (resolv.conf
).
dir: Option<String>
The working directory for commands to run in.
env: Option<Vec<String, Global>>
A list of environment variables in the form VAR=value
.
groups: Option<Vec<String, Global>>
A list of additional groups that the container process will run as.
health_check: Option<HealthConfig>
hostname: Option<String>
The hostname to use for the container, as a valid RFC 1123 hostname.
hosts: Option<Vec<String, Global>>
A list of hostname/IP mappings to add to the container’s hosts
file. The format of extra hosts is specified in the
hosts(5)
man page:
IP_address canonical_hostname [aliases...]
image: Option<String>
The image name to use for the container
init: Option<bool>
Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.
isolation: Option<String>
Isolation technology of the containers running the service. (Windows only)
labels: Option<HashMap<String, String, RandomState>>
User-defined key/value data.
mounts: Option<Vec<Mount, Global>>
Specification for mounts to be added to containers created as part of the service.
open_stdin: Option<bool>
Open stdin
privileges: Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItem>
Security options for the container
read_only: Option<bool>
Mount the container’s root filesystem as read only.
secrets: Option<Vec<TaskSpecContainerSpecInlineItemSecretsInlineItem, Global>>
Secrets contains references to zero or more secrets that will be exposed to the service.
stop_grace_period: Option<i64>
Amount of time to wait for the container to terminate before forcefully killing it.
stop_signal: Option<String>
Signal to stop the container.
sysctls: Option<HashMap<String, String, RandomState>>
Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services accepts the same sysctls as the are supported on containers. Note that while the same sysctls are supported, no guarantees or checks are made about their suitability for a clustered environment, and it’s up to the user to determine whether a given sysctl will work properly in a Service.
tty: Option<bool>
Whether a pseudo-TTY should be allocated.
ulimits: Option<Vec<TaskSpecContainerSpecInlineItemUlimitsInlineItem, Global>>
A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}
“
user: Option<String>
The user inside the container.
Trait Implementations
sourceimpl Clone for TaskSpecContainerSpecInlineItem
impl Clone for TaskSpecContainerSpecInlineItem
sourcefn clone(&self) -> TaskSpecContainerSpecInlineItem
fn clone(&self) -> TaskSpecContainerSpecInlineItem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'de> Deserialize<'de> for TaskSpecContainerSpecInlineItem
impl<'de> Deserialize<'de> for TaskSpecContainerSpecInlineItem
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<TaskSpecContainerSpecInlineItem, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TaskSpecContainerSpecInlineItem, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<TaskSpecContainerSpecInlineItem> for TaskSpecContainerSpecInlineItem
impl PartialEq<TaskSpecContainerSpecInlineItem> for TaskSpecContainerSpecInlineItem
sourcefn eq(&self, other: &TaskSpecContainerSpecInlineItem) -> bool
fn eq(&self, other: &TaskSpecContainerSpecInlineItem) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for TaskSpecContainerSpecInlineItem
impl Serialize for TaskSpecContainerSpecInlineItem
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TaskSpecContainerSpecInlineItem
Auto Trait Implementations
impl RefUnwindSafe for TaskSpecContainerSpecInlineItem
impl Send for TaskSpecContainerSpecInlineItem
impl Sync for TaskSpecContainerSpecInlineItem
impl Unpin for TaskSpecContainerSpecInlineItem
impl UnwindSafe for TaskSpecContainerSpecInlineItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn 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>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more