Class: DockerEngineRuby::Models::Container::HostConfig
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- DockerEngineRuby::Models::Container::HostConfig
- Defined in:
- lib/docker_engine_ruby/models/container.rb
Overview
Defined Under Namespace
Modules: CgroupnsMode, Isolation Classes: BlkioDeviceReadBp, BlkioDeviceReadIOp, BlkioDeviceWriteBp, BlkioDeviceWriteIOp, BlkioWeightDevice, Device, DeviceRequest, LogConfig, Mount, PortBinding, RestartPolicy, Ulimit
Instance Attribute Summary collapse
-
#annotations ⇒ Hash{Symbol=>String}?
Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started.
-
#auto_remove ⇒ Boolean?
Automatically remove the container when the container’s process exits.
-
#binds ⇒ Array<String>?
A list of volume bindings for this container.
-
#blkio_device_read_bps ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceReadBp>?
Limit read rate (bytes per second) from a device, in the form:.
-
#blkio_device_read_i_ops ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceReadIOp>?
Limit read rate (IO per second) from a device, in the form:.
-
#blkio_device_write_bps ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceWriteBp>?
Limit write rate (bytes per second) to a device, in the form:.
-
#blkio_device_write_i_ops ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceWriteIOp>?
Limit write rate (IO per second) to a device, in the form:.
-
#blkio_weight ⇒ Integer?
Block IO weight (relative weight).
-
#blkio_weight_device ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioWeightDevice>?
Block IO weight (relative device weight) in the form:.
-
#cap_add ⇒ Array<String>?
A list of kernel capabilities to add to the container.
-
#cap_drop ⇒ Array<String>?
A list of kernel capabilities to drop from the container.
-
#cgroup ⇒ String?
Cgroup to use for the container.
-
#cgroup_parent ⇒ String?
Path to
cgroupsunder which the container’scgroupis created. -
#cgroupns_mode ⇒ Symbol, ...
cgroup namespace mode for the container.
-
#console_size ⇒ Array<Integer>?
Initial console size, as an ‘[height, width]` array.
-
#container_id_file ⇒ String?
Path to a file where the container ID is written.
-
#cpu_count ⇒ Integer?
The number of usable CPUs (Windows only).
-
#cpu_percent ⇒ Integer?
The usable percentage of the available CPUs (Windows only).
-
#cpu_period ⇒ Integer?
The length of a CPU period in microseconds.
-
#cpu_quota ⇒ Integer?
Microseconds of CPU time that the container can get in a CPU period.
-
#cpu_realtime_period ⇒ Integer?
The length of a CPU real-time period in microseconds.
-
#cpu_realtime_runtime ⇒ Integer?
The length of a CPU real-time runtime in microseconds.
-
#cpu_shares ⇒ Integer?
An integer value representing this container’s relative CPU weight versus other containers.
-
#cpuset_cpus ⇒ String?
CPUs in which to allow execution (e.g.,
0-3, ‘0,1`). -
#cpuset_mems ⇒ String?
Memory nodes (MEMs) in which to allow execution (0-3, 0,1).
-
#device_cgroup_rules ⇒ Array<String>?
a list of cgroup rules to apply to the container.
-
#device_requests ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::DeviceRequest>?
A list of requests for devices to be sent to device drivers.
-
#devices ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::Device>?
A list of devices to add to the container.
-
#dns ⇒ Array<String>?
A list of DNS servers for the container to use.
-
#dns_options ⇒ Array<String>?
A list of DNS options.
-
#dns_search ⇒ Array<String>?
A list of DNS search domains.
-
#extra_hosts ⇒ Array<String>?
A list of hostnames/IP mappings to add to the container’s
/etc/hostsfile. -
#group_add ⇒ Array<String>?
A list of additional groups that the container process will run as.
-
#init ⇒ Boolean?
Run an init inside the container that forwards signals and reaps processes.
-
#io_maximum_bandwidth ⇒ Integer?
Maximum IO in bytes per second for the container system drive (Windows only).
-
#io_maximum_i_ops ⇒ Integer?
Maximum IOps for the container system drive (Windows only).
-
#ipc_mode ⇒ String?
IPC sharing mode for the container.
-
#isolation ⇒ Symbol, ...
Isolation technology of the container.
-
#links ⇒ Array<String>?
A list of links for the container in the form
container_name:alias. -
#log_config ⇒ DockerEngineRuby::Models::Container::HostConfig::LogConfig?
The logging configuration for this container.
-
#masked_paths ⇒ Array<String>?
The list of paths to be masked inside the container (this overrides the default set of paths).
-
#memory ⇒ Integer?
Memory limit in bytes.
-
#memory_reservation ⇒ Integer?
Memory soft limit in bytes.
-
#memory_swap ⇒ Integer?
Total memory limit (memory + swap).
-
#memory_swappiness ⇒ Integer?
Tune a container’s memory swappiness behavior.
-
#mounts ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::Mount>?
Specification for mounts to be added to the container.
-
#nano_cpus ⇒ Integer?
CPU quota in units of 10<sup>-9</sup> CPUs.
-
#network_mode ⇒ String?
Network mode to use for this container.
-
#oom_kill_disable ⇒ Boolean?
Disable OOM Killer for the container.
-
#oom_score_adj ⇒ Integer?
An integer value containing the score given to the container in order to tune OOM killer preferences.
-
#pid_mode ⇒ String?
Set the PID (Process) Namespace mode for the container.
-
#pids_limit ⇒ Integer?
Tune a container’s PIDs limit.
- #port_bindings ⇒ Hash{Symbol=>Array<DockerEngineRuby::Models::Container::HostConfig::PortBinding>}?
-
#privileged ⇒ Boolean?
Gives the container full access to the host.
-
#publish_all_ports ⇒ Boolean?
Allocates an ephemeral host port for all of a container’s exposed ports.
-
#readonly_paths ⇒ Array<String>?
The list of paths to be set as read-only inside the container (this overrides the default set of paths).
-
#readonly_rootfs ⇒ Boolean?
Mount the container’s root filesystem as read only.
-
#restart_policy ⇒ DockerEngineRuby::Models::Container::HostConfig::RestartPolicy?
The behavior to apply when the container exits.
-
#runtime ⇒ String?
Runtime to use with this container.
-
#security_opt ⇒ Array<String>?
A list of string values to customize labels for MLS systems, such as SELinux.
-
#shm_size ⇒ Integer?
Size of
/dev/shmin bytes. -
#storage_opt ⇒ Hash{Symbol=>String}?
Storage driver options for this container, in the form ‘“120G”`.
-
#sysctls ⇒ Hash{Symbol=>String}?
A list of kernel parameters (sysctls) to set in the container.
-
#tmpfs ⇒ Hash{Symbol=>String}?
A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options.
-
#ulimits ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::Ulimit>?
A list of resource limits to set in the container.
-
#userns_mode ⇒ String?
Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
-
#uts_mode ⇒ String?
UTS namespace to use for the container.
-
#volume_driver ⇒ String?
Driver that this container uses to mount volumes.
-
#volumes_from ⇒ Array<String>?
A list of volumes to inherit from another container, specified in the form ‘<container name>`.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(host_ip: nil, host_port: nil) ⇒ Object
constructor
PortBinding represents a binding between a host IP address and a host port.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(host_ip: nil, host_port: nil) ⇒ Object
PortBinding represents a binding between a host IP address and a host port.
|
|
# File 'lib/docker_engine_ruby/models/container.rb', line 1045
|
Instance Attribute Details
#annotations ⇒ Hash{Symbol=>String}?
Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started.
305 |
# File 'lib/docker_engine_ruby/models/container.rb', line 305 optional :annotations, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Annotations |
#auto_remove ⇒ Boolean?
Automatically remove the container when the container’s process exits. This has no effect if RestartPolicy is set.
312 |
# File 'lib/docker_engine_ruby/models/container.rb', line 312 optional :auto_remove, DockerEngineRuby::Internal::Type::Boolean, api_name: :AutoRemove |
#binds ⇒ Array<String>?
A list of volume bindings for this container. Each volume binding is a string in one of these forms:
-
host-src:container-dest[:options]to bind-mount a host path into the container. Bothhost-src, andcontainer-destmust be an absolute path. -
volume-name:container-dest[:options]to bind-mount a volume managed by a volume driver into the container.container-destmust be an absolute path.
options is an optional, comma-delimited list of:
-
nocopydisables automatic copying of data from the container path to the volume. Thenocopyflag only applies to named volumes. -
‘[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or set to
rw, volumes are mounted read-write. -
‘[z|Z]` applies SELinux labels to allow or deny multiple containers to read and write to the same volume.
-
z: a shared content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing. -
Z: a _private unshared_ label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container’s processes from using the content. By default, the labels set by the host operating system are not modified. -
‘[[r]shared|slave|private]` specifies mount [propagation behavior](www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to
shared. For slave volumes, the mount must be set to eithersharedorslave.
350 |
# File 'lib/docker_engine_ruby/models/container.rb', line 350 optional :binds, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Binds |
#blkio_device_read_bps ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceReadBp>?
Limit read rate (bytes per second) from a device, in the form:
“‘
- “device_path”, “Rate”: rate
-
“‘
360 361 362 363 364 |
# File 'lib/docker_engine_ruby/models/container.rb', line 360 optional :blkio_device_read_bps, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::BlkioDeviceReadBp] }, api_name: :BlkioDeviceReadBps |
#blkio_device_read_i_ops ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceReadIOp>?
Limit read rate (IO per second) from a device, in the form:
“‘
- “device_path”, “Rate”: rate
-
“‘
374 375 376 377 378 |
# File 'lib/docker_engine_ruby/models/container.rb', line 374 optional :blkio_device_read_i_ops, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::BlkioDeviceReadIOp] }, api_name: :BlkioDeviceReadIOps |
#blkio_device_write_bps ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceWriteBp>?
Limit write rate (bytes per second) to a device, in the form:
“‘
- “device_path”, “Rate”: rate
-
“‘
388 389 390 391 392 |
# File 'lib/docker_engine_ruby/models/container.rb', line 388 optional :blkio_device_write_bps, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::BlkioDeviceWriteBp] }, api_name: :BlkioDeviceWriteBps |
#blkio_device_write_i_ops ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioDeviceWriteIOp>?
Limit write rate (IO per second) to a device, in the form:
“‘
- “device_path”, “Rate”: rate
-
“‘
402 403 404 405 406 |
# File 'lib/docker_engine_ruby/models/container.rb', line 402 optional :blkio_device_write_i_ops, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::BlkioDeviceWriteIOp] }, api_name: :BlkioDeviceWriteIOps |
#blkio_weight ⇒ Integer?
Block IO weight (relative weight).
412 |
# File 'lib/docker_engine_ruby/models/container.rb', line 412 optional :blkio_weight, Integer, api_name: :BlkioWeight |
#blkio_weight_device ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::BlkioWeightDevice>?
Block IO weight (relative device weight) in the form:
“‘
- “device_path”, “Weight”: weight
-
“‘
422 423 424 425 426 |
# File 'lib/docker_engine_ruby/models/container.rb', line 422 optional :blkio_weight_device, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::BlkioWeightDevice] }, api_name: :BlkioWeightDevice |
#cap_add ⇒ Array<String>?
A list of kernel capabilities to add to the container. Conflicts with option ‘Capabilities’.
433 |
# File 'lib/docker_engine_ruby/models/container.rb', line 433 optional :cap_add, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :CapAdd |
#cap_drop ⇒ Array<String>?
A list of kernel capabilities to drop from the container. Conflicts with option ‘Capabilities’.
440 |
# File 'lib/docker_engine_ruby/models/container.rb', line 440 optional :cap_drop, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :CapDrop |
#cgroup ⇒ String?
Cgroup to use for the container.
446 |
# File 'lib/docker_engine_ruby/models/container.rb', line 446 optional :cgroup, String, api_name: :Cgroup |
#cgroup_parent ⇒ String?
Path to cgroups under which the container’s cgroup is created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups are created if they do not already exist.
468 |
# File 'lib/docker_engine_ruby/models/container.rb', line 468 optional :cgroup_parent, String, api_name: :CgroupParent |
#cgroupns_mode ⇒ Symbol, ...
cgroup namespace mode for the container. Possible values are:
-
‘“private”`: the container runs in its own private cgroup namespace
-
‘“host”`: use the host system’s cgroup namespace
If not specified, the daemon default is used, which can either be ‘“private”` or `“host”`, depending on daemon version, kernel support and configuration.
458 459 460 |
# File 'lib/docker_engine_ruby/models/container.rb', line 458 optional :cgroupns_mode, enum: -> { DockerEngineRuby::Container::HostConfig::CgroupnsMode }, api_name: :CgroupnsMode |
#console_size ⇒ Array<Integer>?
Initial console size, as an ‘[height, width]` array.
474 475 476 477 |
# File 'lib/docker_engine_ruby/models/container.rb', line 474 optional :console_size, DockerEngineRuby::Internal::Type::ArrayOf[Integer], api_name: :ConsoleSize, nil?: true |
#container_id_file ⇒ String?
Path to a file where the container ID is written
483 |
# File 'lib/docker_engine_ruby/models/container.rb', line 483 optional :container_id_file, String, api_name: :ContainerIDFile |
#cpu_count ⇒ Integer?
The number of usable CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
493 |
# File 'lib/docker_engine_ruby/models/container.rb', line 493 optional :cpu_count, Integer, api_name: :CpuCount |
#cpu_percent ⇒ Integer?
The usable percentage of the available CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
503 |
# File 'lib/docker_engine_ruby/models/container.rb', line 503 optional :cpu_percent, Integer, api_name: :CpuPercent |
#cpu_period ⇒ Integer?
The length of a CPU period in microseconds.
509 |
# File 'lib/docker_engine_ruby/models/container.rb', line 509 optional :cpu_period, Integer, api_name: :CpuPeriod |
#cpu_quota ⇒ Integer?
Microseconds of CPU time that the container can get in a CPU period.
515 |
# File 'lib/docker_engine_ruby/models/container.rb', line 515 optional :cpu_quota, Integer, api_name: :CpuQuota |
#cpu_realtime_period ⇒ Integer?
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
522 |
# File 'lib/docker_engine_ruby/models/container.rb', line 522 optional :cpu_realtime_period, Integer, api_name: :CpuRealtimePeriod |
#cpu_realtime_runtime ⇒ Integer?
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
529 |
# File 'lib/docker_engine_ruby/models/container.rb', line 529 optional :cpu_realtime_runtime, Integer, api_name: :CpuRealtimeRuntime |
#cpu_shares ⇒ Integer?
An integer value representing this container’s relative CPU weight versus other containers.
549 |
# File 'lib/docker_engine_ruby/models/container.rb', line 549 optional :cpu_shares, Integer, api_name: :CpuShares |
#cpuset_cpus ⇒ String?
CPUs in which to allow execution (e.g., 0-3, ‘0,1`).
535 |
# File 'lib/docker_engine_ruby/models/container.rb', line 535 optional :cpuset_cpus, String, api_name: :CpusetCpus |
#cpuset_mems ⇒ String?
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
542 |
# File 'lib/docker_engine_ruby/models/container.rb', line 542 optional :cpuset_mems, String, api_name: :CpusetMems |
#device_cgroup_rules ⇒ Array<String>?
a list of cgroup rules to apply to the container
555 556 557 |
# File 'lib/docker_engine_ruby/models/container.rb', line 555 optional :device_cgroup_rules, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :DeviceCgroupRules |
#device_requests ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::DeviceRequest>?
A list of requests for devices to be sent to device drivers.
563 564 565 566 567 |
# File 'lib/docker_engine_ruby/models/container.rb', line 563 optional :device_requests, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::DeviceRequest] }, api_name: :DeviceRequests |
#devices ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::Device>?
A list of devices to add to the container.
573 574 575 576 577 |
# File 'lib/docker_engine_ruby/models/container.rb', line 573 optional :devices, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::Device] }, api_name: :Devices |
#dns ⇒ Array<String>?
A list of DNS servers for the container to use.
583 |
# File 'lib/docker_engine_ruby/models/container.rb', line 583 optional :dns, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Dns |
#dns_options ⇒ Array<String>?
A list of DNS options.
589 |
# File 'lib/docker_engine_ruby/models/container.rb', line 589 optional :dns_options, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :DnsOptions |
#dns_search ⇒ Array<String>?
A list of DNS search domains.
595 |
# File 'lib/docker_engine_ruby/models/container.rb', line 595 optional :dns_search, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :DnsSearch |
#extra_hosts ⇒ Array<String>?
A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ‘[“hostname:IP”]`.
602 |
# File 'lib/docker_engine_ruby/models/container.rb', line 602 optional :extra_hosts, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :ExtraHosts |
#group_add ⇒ Array<String>?
A list of additional groups that the container process will run as.
608 |
# File 'lib/docker_engine_ruby/models/container.rb', line 608 optional :group_add, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :GroupAdd |
#init ⇒ Boolean?
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.
616 |
# File 'lib/docker_engine_ruby/models/container.rb', line 616 optional :init, DockerEngineRuby::Internal::Type::Boolean, api_name: :Init, nil?: true |
#io_maximum_bandwidth ⇒ Integer?
Maximum IO in bytes per second for the container system drive (Windows only).
622 |
# File 'lib/docker_engine_ruby/models/container.rb', line 622 optional :io_maximum_bandwidth, Integer, api_name: :IOMaximumBandwidth |
#io_maximum_i_ops ⇒ Integer?
Maximum IOps for the container system drive (Windows only)
628 |
# File 'lib/docker_engine_ruby/models/container.rb', line 628 optional :io_maximum_i_ops, Integer, api_name: :IOMaximumIOps |
#ipc_mode ⇒ String?
IPC sharing mode for the container. Possible values are:
-
‘“none”`: own private IPC namespace, with /dev/shm not mounted
-
‘“private”`: own private IPC namespace
-
‘“shareable”`: own private IPC namespace, with a possibility to share it with other containers
-
‘“container:<name|id>”`: join another (shareable) container’s IPC namespace
-
‘“host”`: use the host system’s IPC namespace
If not specified, daemon default is used, which can either be ‘“private”` or `“shareable”`, depending on daemon version and configuration.
644 |
# File 'lib/docker_engine_ruby/models/container.rb', line 644 optional :ipc_mode, String, api_name: :IpcMode |
#isolation ⇒ Symbol, ...
Isolation technology of the container. (Windows only)
650 651 652 653 654 |
# File 'lib/docker_engine_ruby/models/container.rb', line 650 optional :isolation, enum: -> { DockerEngineRuby::Container::HostConfig::Isolation }, api_name: :Isolation |
#links ⇒ Array<String>?
A list of links for the container in the form container_name:alias.
660 |
# File 'lib/docker_engine_ruby/models/container.rb', line 660 optional :links, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Links |
#log_config ⇒ DockerEngineRuby::Models::Container::HostConfig::LogConfig?
The logging configuration for this container
666 |
# File 'lib/docker_engine_ruby/models/container.rb', line 666 optional :log_config, -> { DockerEngineRuby::Container::HostConfig::LogConfig }, api_name: :LogConfig |
#masked_paths ⇒ Array<String>?
The list of paths to be masked inside the container (this overrides the default set of paths).
673 |
# File 'lib/docker_engine_ruby/models/container.rb', line 673 optional :masked_paths, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :MaskedPaths |
#memory ⇒ Integer?
Memory limit in bytes.
679 |
# File 'lib/docker_engine_ruby/models/container.rb', line 679 optional :memory, Integer, api_name: :Memory |
#memory_reservation ⇒ Integer?
Memory soft limit in bytes.
685 |
# File 'lib/docker_engine_ruby/models/container.rb', line 685 optional :memory_reservation, Integer, api_name: :MemoryReservation |
#memory_swap ⇒ Integer?
Total memory limit (memory + swap). Set as -1 to enable unlimited swap.
691 |
# File 'lib/docker_engine_ruby/models/container.rb', line 691 optional :memory_swap, Integer, api_name: :MemorySwap |
#memory_swappiness ⇒ Integer?
Tune a container’s memory swappiness behavior. Accepts an integer between 0 and 100.
698 |
# File 'lib/docker_engine_ruby/models/container.rb', line 698 optional :memory_swappiness, Integer, api_name: :MemorySwappiness |
#mounts ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::Mount>?
Specification for mounts to be added to the container.
704 705 706 707 708 |
# File 'lib/docker_engine_ruby/models/container.rb', line 704 optional :mounts, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::Mount] }, api_name: :Mounts |
#nano_cpus ⇒ Integer?
CPU quota in units of 10<sup>-9</sup> CPUs.
714 |
# File 'lib/docker_engine_ruby/models/container.rb', line 714 optional :nano_cpus, Integer, api_name: :NanoCpus |
#network_mode ⇒ String?
Network mode to use for this container. Supported standard values are: bridge, host, none, and ‘container:<name|id>`. Any other value is taken as a custom network’s name to which this container should connect to.
722 |
# File 'lib/docker_engine_ruby/models/container.rb', line 722 optional :network_mode, String, api_name: :NetworkMode |
#oom_kill_disable ⇒ Boolean?
Disable OOM Killer for the container.
728 |
# File 'lib/docker_engine_ruby/models/container.rb', line 728 optional :oom_kill_disable, DockerEngineRuby::Internal::Type::Boolean, api_name: :OomKillDisable |
#oom_score_adj ⇒ Integer?
An integer value containing the score given to the container in order to tune OOM killer preferences.
735 |
# File 'lib/docker_engine_ruby/models/container.rb', line 735 optional :oom_score_adj, Integer, api_name: :OomScoreAdj |
#pid_mode ⇒ String?
Set the PID (Process) Namespace mode for the container. It can be either:
-
‘“container:<name|id>”`: joins another container’s PID namespace
-
‘“host”`: use the host’s PID namespace inside the container
744 |
# File 'lib/docker_engine_ruby/models/container.rb', line 744 optional :pid_mode, String, api_name: :PidMode |
#pids_limit ⇒ Integer?
Tune a container’s PIDs limit. Set 0 or -1 for unlimited, or null to not change.
751 |
# File 'lib/docker_engine_ruby/models/container.rb', line 751 optional :pids_limit, Integer, api_name: :PidsLimit, nil?: true |
#port_bindings ⇒ Hash{Symbol=>Array<DockerEngineRuby::Models::Container::HostConfig::PortBinding>}?
756 757 758 759 760 |
# File 'lib/docker_engine_ruby/models/container.rb', line 756 optional :port_bindings, -> { DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::PortBinding]] }, api_name: :PortBindings |
#privileged ⇒ Boolean?
Gives the container full access to the host.
766 |
# File 'lib/docker_engine_ruby/models/container.rb', line 766 optional :privileged, DockerEngineRuby::Internal::Type::Boolean, api_name: :Privileged |
#publish_all_ports ⇒ Boolean?
Allocates an ephemeral host port for all of a container’s exposed ports.
Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container.
The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by /proc/sys/net/ipv4/ip_local_port_range.
779 |
# File 'lib/docker_engine_ruby/models/container.rb', line 779 optional :publish_all_ports, DockerEngineRuby::Internal::Type::Boolean, api_name: :PublishAllPorts |
#readonly_paths ⇒ Array<String>?
The list of paths to be set as read-only inside the container (this overrides the default set of paths).
786 |
# File 'lib/docker_engine_ruby/models/container.rb', line 786 optional :readonly_paths, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :ReadonlyPaths |
#readonly_rootfs ⇒ Boolean?
Mount the container’s root filesystem as read only.
792 |
# File 'lib/docker_engine_ruby/models/container.rb', line 792 optional :readonly_rootfs, DockerEngineRuby::Internal::Type::Boolean, api_name: :ReadonlyRootfs |
#restart_policy ⇒ DockerEngineRuby::Models::Container::HostConfig::RestartPolicy?
The behavior to apply when the container exits. The default is not to restart.
An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
801 802 803 |
# File 'lib/docker_engine_ruby/models/container.rb', line 801 optional :restart_policy, -> { DockerEngineRuby::Container::HostConfig::RestartPolicy }, api_name: :RestartPolicy |
#runtime ⇒ String?
Runtime to use with this container.
809 |
# File 'lib/docker_engine_ruby/models/container.rb', line 809 optional :runtime, String, api_name: :Runtime, nil?: true |
#security_opt ⇒ Array<String>?
A list of string values to customize labels for MLS systems, such as SELinux.
815 |
# File 'lib/docker_engine_ruby/models/container.rb', line 815 optional :security_opt, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :SecurityOpt |
#shm_size ⇒ Integer?
Size of /dev/shm in bytes. If omitted, the system uses 64MB.
821 |
# File 'lib/docker_engine_ruby/models/container.rb', line 821 optional :shm_size, Integer, api_name: :ShmSize |
#storage_opt ⇒ Hash{Symbol=>String}?
Storage driver options for this container, in the form ‘“120G”`.
827 |
# File 'lib/docker_engine_ruby/models/container.rb', line 827 optional :storage_opt, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :StorageOpt |
#sysctls ⇒ Hash{Symbol=>String}?
A list of kernel parameters (sysctls) to set in the container.
This field is omitted if not set.
835 |
# File 'lib/docker_engine_ruby/models/container.rb', line 835 optional :sysctls, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Sysctls, nil?: true |
#tmpfs ⇒ Hash{Symbol=>String}?
A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example:
“‘ { “/run”: “rw,noexec,nosuid,size=65536k” } “`
846 |
# File 'lib/docker_engine_ruby/models/container.rb', line 846 optional :tmpfs, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Tmpfs |
#ulimits ⇒ Array<DockerEngineRuby::Models::Container::HostConfig::Ulimit>?
A list of resource limits to set in the container. For example:
“‘ “nofile”, “Soft”: 1024, “Hard”: 2048 “`
856 857 858 859 860 |
# File 'lib/docker_engine_ruby/models/container.rb', line 856 optional :ulimits, -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::HostConfig::Ulimit] }, api_name: :Ulimits |
#userns_mode ⇒ String?
Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
867 |
# File 'lib/docker_engine_ruby/models/container.rb', line 867 optional :userns_mode, String, api_name: :UsernsMode |
#uts_mode ⇒ String?
UTS namespace to use for the container.
873 |
# File 'lib/docker_engine_ruby/models/container.rb', line 873 optional :uts_mode, String, api_name: :UTSMode |
#volume_driver ⇒ String?
Driver that this container uses to mount volumes.
879 |
# File 'lib/docker_engine_ruby/models/container.rb', line 879 optional :volume_driver, String, api_name: :VolumeDriver |
#volumes_from ⇒ Array<String>?
A list of volumes to inherit from another container, specified in the form ‘<container name>`.
886 |
# File 'lib/docker_engine_ruby/models/container.rb', line 886 optional :volumes_from, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :VolumesFrom |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/docker_engine_ruby/models/container.rb', line 1139
|