Class: DockerEngineAPI::Models::Container

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_api/models/container.rb

Overview

Defined Under Namespace

Classes: GraphDriver, HostConfig, ImageManifestDescriptor, Mount, NetworkSettings, State, Storage

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • host_ip (String) (defaults to: nil)

    Host IP address that the container’s port is mapped to.

  • host_port (String) (defaults to: nil)

    Host port number that the container’s port is mapped to.



# File 'lib/docker_engine_api/models/container.rb', line 210


Instance Attribute Details

#app_armor_profileString?

The AppArmor profile set for the container.

Returns:

  • (String, nil)


11
# File 'lib/docker_engine_api/models/container.rb', line 11

optional :app_armor_profile, String, api_name: :AppArmorProfile

#argsArray<String>?

The arguments to the command being run

Returns:

  • (Array<String>, nil)


17
# File 'lib/docker_engine_api/models/container.rb', line 17

optional :args, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :Args

#configDockerEngineAPI::Models::Config?

Configuration for a container that is portable between hosts.



23
# File 'lib/docker_engine_api/models/container.rb', line 23

optional :config, -> { DockerEngineAPI::Config }, api_name: :Config

#createdString?

Date and time at which the container was created, formatted in [RFC 3339](www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.

Returns:

  • (String, nil)


30
# File 'lib/docker_engine_api/models/container.rb', line 30

optional :created, String, api_name: :Created, nil?: true

#driverString?

The storage-driver used for the container’s filesystem (graph-driver or snapshotter).

Returns:

  • (String, nil)


37
# File 'lib/docker_engine_api/models/container.rb', line 37

optional :driver, String, api_name: :Driver

#exec_idsArray<String>?

IDs of exec instances that are running in the container.

Returns:

  • (Array<String>, nil)


43
# File 'lib/docker_engine_api/models/container.rb', line 43

optional :exec_ids, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :ExecIDs, nil?: true

#graph_driverDockerEngineAPI::Models::Container::GraphDriver?

Information about the storage driver used to store the container’s and image’s filesystem.



50
# File 'lib/docker_engine_api/models/container.rb', line 50

optional :graph_driver, -> { DockerEngineAPI::Container::GraphDriver }, api_name: :GraphDriver

#host_configDockerEngineAPI::Models::Container::HostConfig?

Container configuration that depends on the host we are running on



56
# File 'lib/docker_engine_api/models/container.rb', line 56

optional :host_config, -> { DockerEngineAPI::Container::HostConfig }, api_name: :HostConfig

#hostname_pathString?

Location of the /etc/hostname generated for the container on the host.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


65
# File 'lib/docker_engine_api/models/container.rb', line 65

optional :hostname_path, String, api_name: :HostnamePath

#hosts_pathString?

Location of the /etc/hosts generated for the container on the host.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


74
# File 'lib/docker_engine_api/models/container.rb', line 74

optional :hosts_path, String, api_name: :HostsPath

#idString?

The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes).

Returns:

  • (String, nil)


81
# File 'lib/docker_engine_api/models/container.rb', line 81

optional :id, String, api_name: :Id

#imageString?

The ID (digest) of the image that this container was created from.

Returns:

  • (String, nil)


87
# File 'lib/docker_engine_api/models/container.rb', line 87

optional :image, String, api_name: :Image

#image_manifest_descriptorDockerEngineAPI::Models::Container::ImageManifestDescriptor?

A descriptor struct containing digest, media type, and size, as defined in the [OCI Content Descriptors Specification](github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).



94
95
96
# File 'lib/docker_engine_api/models/container.rb', line 94

optional :image_manifest_descriptor,
-> { DockerEngineAPI::Container::ImageManifestDescriptor },
api_name: :ImageManifestDescriptor

#log_pathString?

Location of the file used to buffer the container’s logs. Depending on the logging-driver used for the container, this field may be omitted.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


106
# File 'lib/docker_engine_api/models/container.rb', line 106

optional :log_path, String, api_name: :LogPath, nil?: true

#mount_labelString?

SELinux mount label set for the container.

Returns:

  • (String, nil)


112
# File 'lib/docker_engine_api/models/container.rb', line 112

optional :mount_label, String, api_name: :MountLabel

#mountsArray<DockerEngineAPI::Models::Container::Mount>?

List of mounts used by the container.



118
119
120
# File 'lib/docker_engine_api/models/container.rb', line 118

optional :mounts,
-> { DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::Container::Mount] },
api_name: :Mounts

#nameString?

The name associated with this container.

For historic reasons, the name may be prefixed with a forward-slash (/).

Returns:

  • (String, nil)


128
# File 'lib/docker_engine_api/models/container.rb', line 128

optional :name, String, api_name: :Name

#network_settingsDockerEngineAPI::Models::Container::NetworkSettings?

NetworkSettings exposes the network settings in the API



134
135
136
137
138
# File 'lib/docker_engine_api/models/container.rb', line 134

optional :network_settings,
-> {
  DockerEngineAPI::Container::NetworkSettings
},
api_name: :NetworkSettings

#pathString?

The path to the command being run

Returns:

  • (String, nil)


144
# File 'lib/docker_engine_api/models/container.rb', line 144

optional :path, String, api_name: :Path

#platformString?

The platform (operating system) for which the container was created.

This field was introduced for the experimental “LCOW” (Linux Containers On Windows) features, which has been removed. In most cases, this field is equal to the host’s operating system (linux or windows).

Returns:

  • (String, nil)


154
# File 'lib/docker_engine_api/models/container.rb', line 154

optional :platform, String, api_name: :Platform

#process_labelString?

SELinux process label set for the container.

Returns:

  • (String, nil)


160
# File 'lib/docker_engine_api/models/container.rb', line 160

optional :process_label, String, api_name: :ProcessLabel

#resolv_conf_pathString?

Location of the /etc/resolv.conf generated for the container on the host.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


169
# File 'lib/docker_engine_api/models/container.rb', line 169

optional :resolv_conf_path, String, api_name: :ResolvConfPath

#restart_countInteger?

Number of times the container was restarted since it was created, or since daemon was started.

Returns:

  • (Integer, nil)


176
# File 'lib/docker_engine_api/models/container.rb', line 176

optional :restart_count, Integer, api_name: :RestartCount

#size_root_fsInteger?

The total size of all files in the read-only layers from the image that the container uses. These layers can be shared between containers.

This field is omitted by default, and only set when size is requested in the API request.

Returns:

  • (Integer, nil)


186
# File 'lib/docker_engine_api/models/container.rb', line 186

optional :size_root_fs, Integer, api_name: :SizeRootFs, nil?: true

#size_rwInteger?

The size of files that have been created or changed by this container.

This field is omitted by default, and only set when size is requested in the API request.

Returns:

  • (Integer, nil)


195
# File 'lib/docker_engine_api/models/container.rb', line 195

optional :size_rw, Integer, api_name: :SizeRw, nil?: true

#stateDockerEngineAPI::Models::Container::State?

ContainerState stores container’s running state. It’s part of ContainerJSONBase and will be returned by the “inspect” command.



202
# File 'lib/docker_engine_api/models/container.rb', line 202

optional :state, -> { DockerEngineAPI::Container::State }, api_name: :State, nil?: true

#storageDockerEngineAPI::Models::Container::Storage?

Information about the storage used by the container.



208
# File 'lib/docker_engine_api/models/container.rb', line 208

optional :storage, -> { DockerEngineAPI::Container::Storage }, api_name: :Storage

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_api/models/container.rb', line 1968