Struct podman_api::models::ContainerNetworkConfig[][src]

pub struct ContainerNetworkConfig {
Show 16 fields pub aliases: Option<HashMap<String, Vec<String, Global>, RandomState>>, pub cni_networks: Option<Vec<String, Global>>, pub dns_option: Option<Vec<String, Global>>, pub dns_search: Option<Vec<String, Global>>, pub dns_server: Option<Vec<Vec<i32, Global>, Global>>, pub expose: Option<Value>, pub hostadd: Option<Vec<String, Global>>, pub netns: Option<Namespace>, pub network_options: Option<HashMap<String, Vec<String, Global>, RandomState>>, pub portmappings: Option<Vec<PortMapping, Global>>, pub publish_image_ports: Option<bool>, pub static_ip: Option<Vec<i32, Global>>, pub static_ipv6: Option<Vec<i32, Global>>, pub static_mac: Option<Vec<i32, Global>>, pub use_image_hosts: Option<bool>, pub use_image_resolve_conf: Option<bool>,
}
Expand description

ContainerNetworkConfig contains information on a container’s network configuration.

Fields

aliases: Option<HashMap<String, Vec<String, Global>, RandomState>>

Aliases are a list of network-scoped aliases for container Optional

cni_networks: Option<Vec<String, Global>>

CNINetworks is a list of CNI networks to join the container to. If this list is empty, the default CNI network will be joined instead. If at least one entry is present, we will not join the default network (unless it is part of this list). Only available if NetNS is set to bridge. Optional.

dns_option: Option<Vec<String, Global>>

DNSOptions is a set of DNS options that will be used in the container’s resolv.conf, replacing the host’s DNS options which are used by default. Conflicts with UseImageResolvConf. Optional.

dns_search: Option<Vec<String, Global>>

DNSSearch is a set of DNS search domains that will be used in the container’s resolv.conf, replacing the host’s DNS search domains which are used by default. Conflicts with UseImageResolvConf. Optional.

dns_server: Option<Vec<Vec<i32, Global>, Global>>

DNSServers is a set of DNS servers that will be used in the container’s resolv.conf, replacing the host’s DNS Servers which are used by default. Conflicts with UseImageResolvConf. Optional.

expose: Option<Value>

Expose is a number of ports that will be forwarded to the container if PublishExposedPorts is set. Expose is a map of uint16 (port number) to a string representing protocol. Allowed protocols are "tcp", "udp", and "sctp", or some combination of the three separated by commas. If protocol is set to "" we will assume TCP. Only available if NetNS is set to Bridge or Slirp, and PublishExposedPorts is set. Optional.

hostadd: Option<Vec<String, Global>>

HostAdd is a set of hosts which will be added to the container’s etc/hosts file. Conflicts with UseImageHosts. Optional.

netns: Option<Namespace>network_options: Option<HashMap<String, Vec<String, Global>, RandomState>>

NetworkOptions are additional options for each network Optional.

portmappings: Option<Vec<PortMapping, Global>>

PortBindings is a set of ports to map into the container. Only available if NetNS is set to bridge or slirp. Optional.

publish_image_ports: Option<bool>

PublishExposedPorts will publish ports specified in the image to random unused ports (guaranteed to be above 1024) on the host. This is based on ports set in Expose below, and any ports specified by the Image (if one is given). Only available if NetNS is set to Bridge or Slirp.

static_ip: Option<Vec<i32, Global>>static_ipv6: Option<Vec<i32, Global>>static_mac: Option<Vec<i32, Global>>use_image_hosts: Option<bool>

UseImageHosts indicates that /etc/hosts should not be managed by Podman, and instead sourced from the image. Conflicts with HostAdd.

use_image_resolve_conf: Option<bool>

UseImageResolvConf indicates that resolv.conf should not be managed by Podman, but instead sourced from the image. Conflicts with DNSServer, DNSSearch, DNSOption.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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