docker-engine 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +17 -0
- data/README.md +230 -0
- data/SECURITY.md +27 -0
- data/lib/docker_engine/client.rb +77 -0
- data/lib/docker_engine/errors.rb +228 -0
- data/lib/docker_engine/file_part.rb +58 -0
- data/lib/docker_engine/internal/transport/base_client.rb +567 -0
- data/lib/docker_engine/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/docker_engine/internal/type/array_of.rb +168 -0
- data/lib/docker_engine/internal/type/base_model.rb +529 -0
- data/lib/docker_engine/internal/type/base_page.rb +55 -0
- data/lib/docker_engine/internal/type/boolean.rb +77 -0
- data/lib/docker_engine/internal/type/converter.rb +327 -0
- data/lib/docker_engine/internal/type/enum.rb +131 -0
- data/lib/docker_engine/internal/type/file_input.rb +111 -0
- data/lib/docker_engine/internal/type/hash_of.rb +188 -0
- data/lib/docker_engine/internal/type/request_parameters.rb +42 -0
- data/lib/docker_engine/internal/type/union.rb +243 -0
- data/lib/docker_engine/internal/type/unknown.rb +81 -0
- data/lib/docker_engine/internal/util.rb +920 -0
- data/lib/docker_engine/internal.rb +20 -0
- data/lib/docker_engine/models/auth_login_params.rb +32 -0
- data/lib/docker_engine/models/auth_response.rb +27 -0
- data/lib/docker_engine/models/config.rb +307 -0
- data/lib/docker_engine/models/container.rb +2489 -0
- data/lib/docker_engine/models/container_create_params.rb +1716 -0
- data/lib/docker_engine/models/container_delete_params.rb +38 -0
- data/lib/docker_engine/models/container_inspect_params.rb +22 -0
- data/lib/docker_engine/models/container_kill_params.rb +25 -0
- data/lib/docker_engine/models/container_list_params.rb +70 -0
- data/lib/docker_engine/models/container_list_response.rb +8 -0
- data/lib/docker_engine/models/container_logs_params.rb +74 -0
- data/lib/docker_engine/models/container_start_params.rb +27 -0
- data/lib/docker_engine/models/container_stop_params.rb +33 -0
- data/lib/docker_engine/models/create_request.rb +348 -0
- data/lib/docker_engine/models/create_response.rb +27 -0
- data/lib/docker_engine/models/error.rb +18 -0
- data/lib/docker_engine/models/image.rb +1393 -0
- data/lib/docker_engine/models/image_delete_params.rb +43 -0
- data/lib/docker_engine/models/image_delete_response.rb +28 -0
- data/lib/docker_engine/models/image_inspect_params.rb +22 -0
- data/lib/docker_engine/models/image_list_params.rb +68 -0
- data/lib/docker_engine/models/image_list_response.rb +8 -0
- data/lib/docker_engine/models/image_pull_params.rb +115 -0
- data/lib/docker_engine/models/network.rb +253 -0
- data/lib/docker_engine/models/network_create_params.rb +210 -0
- data/lib/docker_engine/models/network_create_response.rb +27 -0
- data/lib/docker_engine/models/network_delete_params.rb +14 -0
- data/lib/docker_engine/models/network_inspect_params.rb +30 -0
- data/lib/docker_engine/models/network_inspect_response.rb +131 -0
- data/lib/docker_engine/models/network_list_params.rb +40 -0
- data/lib/docker_engine/models/network_list_response.rb +8 -0
- data/lib/docker_engine/models/service.rb +520 -0
- data/lib/docker_engine/models/service_create_params.rb +34 -0
- data/lib/docker_engine/models/service_create_response.rb +32 -0
- data/lib/docker_engine/models/service_delete_params.rb +14 -0
- data/lib/docker_engine/models/service_inspect_params.rb +22 -0
- data/lib/docker_engine/models/service_list_params.rb +41 -0
- data/lib/docker_engine/models/service_list_response.rb +8 -0
- data/lib/docker_engine/models/spec.rb +2302 -0
- data/lib/docker_engine/models/summary.rb +763 -0
- data/lib/docker_engine/models/system_info_params.rb +14 -0
- data/lib/docker_engine/models/system_info_response.rb +1879 -0
- data/lib/docker_engine/models/system_ping_params.rb +14 -0
- data/lib/docker_engine/models/system_ping_response.rb +7 -0
- data/lib/docker_engine/models/system_version_params.rb +14 -0
- data/lib/docker_engine/models/system_version_response.rb +164 -0
- data/lib/docker_engine/models/volume.rb +650 -0
- data/lib/docker_engine/models/volume_create_params.rb +14 -0
- data/lib/docker_engine/models/volume_delete_params.rb +22 -0
- data/lib/docker_engine/models/volume_inspect_params.rb +14 -0
- data/lib/docker_engine/models/volume_list_params.rb +34 -0
- data/lib/docker_engine/models/volume_list_response.rb +34 -0
- data/lib/docker_engine/models.rb +121 -0
- data/lib/docker_engine/request_options.rb +77 -0
- data/lib/docker_engine/resources/auth.rb +38 -0
- data/lib/docker_engine/resources/containers.rb +258 -0
- data/lib/docker_engine/resources/images.rb +156 -0
- data/lib/docker_engine/resources/networks.rb +139 -0
- data/lib/docker_engine/resources/services.rb +113 -0
- data/lib/docker_engine/resources/system.rb +70 -0
- data/lib/docker_engine/resources/volumes.rb +105 -0
- data/lib/docker_engine/version.rb +5 -0
- data/lib/docker_engine.rb +114 -0
- data/manifest.yaml +17 -0
- data/rbi/docker_engine/client.rbi +56 -0
- data/rbi/docker_engine/errors.rbi +205 -0
- data/rbi/docker_engine/file_part.rbi +37 -0
- data/rbi/docker_engine/internal/transport/base_client.rbi +300 -0
- data/rbi/docker_engine/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/docker_engine/internal/type/array_of.rbi +104 -0
- data/rbi/docker_engine/internal/type/base_model.rbi +314 -0
- data/rbi/docker_engine/internal/type/base_page.rbi +43 -0
- data/rbi/docker_engine/internal/type/boolean.rbi +58 -0
- data/rbi/docker_engine/internal/type/converter.rbi +222 -0
- data/rbi/docker_engine/internal/type/enum.rbi +82 -0
- data/rbi/docker_engine/internal/type/file_input.rbi +59 -0
- data/rbi/docker_engine/internal/type/hash_of.rbi +104 -0
- data/rbi/docker_engine/internal/type/request_parameters.rbi +31 -0
- data/rbi/docker_engine/internal/type/union.rbi +128 -0
- data/rbi/docker_engine/internal/type/unknown.rbi +58 -0
- data/rbi/docker_engine/internal/util.rbi +487 -0
- data/rbi/docker_engine/internal.rbi +18 -0
- data/rbi/docker_engine/models/auth_login_params.rbi +62 -0
- data/rbi/docker_engine/models/auth_response.rbi +39 -0
- data/rbi/docker_engine/models/config.rbi +442 -0
- data/rbi/docker_engine/models/container.rbi +4575 -0
- data/rbi/docker_engine/models/container_create_params.rbi +3297 -0
- data/rbi/docker_engine/models/container_delete_params.rbi +71 -0
- data/rbi/docker_engine/models/container_inspect_params.rbi +46 -0
- data/rbi/docker_engine/models/container_kill_params.rbi +46 -0
- data/rbi/docker_engine/models/container_list_params.rbi +124 -0
- data/rbi/docker_engine/models/container_list_response.rbi +11 -0
- data/rbi/docker_engine/models/container_logs_params.rbi +117 -0
- data/rbi/docker_engine/models/container_start_params.rbi +50 -0
- data/rbi/docker_engine/models/container_stop_params.rbi +60 -0
- data/rbi/docker_engine/models/create_request.rbi +702 -0
- data/rbi/docker_engine/models/create_response.rbi +36 -0
- data/rbi/docker_engine/models/error.rbi +28 -0
- data/rbi/docker_engine/models/image.rbi +2323 -0
- data/rbi/docker_engine/models/image_delete_params.rbi +75 -0
- data/rbi/docker_engine/models/image_delete_response.rbi +52 -0
- data/rbi/docker_engine/models/image_inspect_params.rbi +49 -0
- data/rbi/docker_engine/models/image_list_params.rbi +112 -0
- data/rbi/docker_engine/models/image_list_response.rbi +11 -0
- data/rbi/docker_engine/models/image_pull_params.rbi +186 -0
- data/rbi/docker_engine/models/network.rbi +419 -0
- data/rbi/docker_engine/models/network_create_params.rbi +362 -0
- data/rbi/docker_engine/models/network_create_response.rbi +37 -0
- data/rbi/docker_engine/models/network_delete_params.rbi +32 -0
- data/rbi/docker_engine/models/network_inspect_params.rbi +60 -0
- data/rbi/docker_engine/models/network_inspect_response.rbi +329 -0
- data/rbi/docker_engine/models/network_list_params.rbi +76 -0
- data/rbi/docker_engine/models/network_list_response.rbi +11 -0
- data/rbi/docker_engine/models/service.rbi +1076 -0
- data/rbi/docker_engine/models/service_create_params.rbi +77 -0
- data/rbi/docker_engine/models/service_create_response.rbi +50 -0
- data/rbi/docker_engine/models/service_delete_params.rbi +32 -0
- data/rbi/docker_engine/models/service_inspect_params.rbi +49 -0
- data/rbi/docker_engine/models/service_list_params.rbi +76 -0
- data/rbi/docker_engine/models/service_list_response.rbi +11 -0
- data/rbi/docker_engine/models/spec.rbi +4587 -0
- data/rbi/docker_engine/models/summary.rbi +1298 -0
- data/rbi/docker_engine/models/system_info_params.rbi +29 -0
- data/rbi/docker_engine/models/system_info_response.rbi +3587 -0
- data/rbi/docker_engine/models/system_ping_params.rbi +29 -0
- data/rbi/docker_engine/models/system_ping_response.rbi +7 -0
- data/rbi/docker_engine/models/system_version_params.rbi +32 -0
- data/rbi/docker_engine/models/system_version_response.rbi +282 -0
- data/rbi/docker_engine/models/volume.rbi +1218 -0
- data/rbi/docker_engine/models/volume_create_params.rbi +32 -0
- data/rbi/docker_engine/models/volume_delete_params.rbi +46 -0
- data/rbi/docker_engine/models/volume_inspect_params.rbi +32 -0
- data/rbi/docker_engine/models/volume_list_params.rbi +61 -0
- data/rbi/docker_engine/models/volume_list_response.rbi +55 -0
- data/rbi/docker_engine/models.rbi +83 -0
- data/rbi/docker_engine/request_options.rbi +59 -0
- data/rbi/docker_engine/resources/auth.rbi +30 -0
- data/rbi/docker_engine/resources/containers.rbi +231 -0
- data/rbi/docker_engine/resources/images.rbi +164 -0
- data/rbi/docker_engine/resources/networks.rbi +133 -0
- data/rbi/docker_engine/resources/services.rbi +88 -0
- data/rbi/docker_engine/resources/system.rbi +40 -0
- data/rbi/docker_engine/resources/volumes.rbi +80 -0
- data/rbi/docker_engine/version.rbi +5 -0
- data/sig/docker_engine/client.rbs +33 -0
- data/sig/docker_engine/errors.rbs +117 -0
- data/sig/docker_engine/file_part.rbs +21 -0
- data/sig/docker_engine/internal/transport/base_client.rbs +131 -0
- data/sig/docker_engine/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/docker_engine/internal/type/array_of.rbs +48 -0
- data/sig/docker_engine/internal/type/base_model.rbs +104 -0
- data/sig/docker_engine/internal/type/base_page.rbs +24 -0
- data/sig/docker_engine/internal/type/boolean.rbs +26 -0
- data/sig/docker_engine/internal/type/converter.rbs +79 -0
- data/sig/docker_engine/internal/type/enum.rbs +32 -0
- data/sig/docker_engine/internal/type/file_input.rbs +25 -0
- data/sig/docker_engine/internal/type/hash_of.rbs +48 -0
- data/sig/docker_engine/internal/type/request_parameters.rbs +19 -0
- data/sig/docker_engine/internal/type/union.rbs +52 -0
- data/sig/docker_engine/internal/type/unknown.rbs +26 -0
- data/sig/docker_engine/internal/util.rbs +185 -0
- data/sig/docker_engine/internal.rbs +9 -0
- data/sig/docker_engine/models/auth_login_params.rbs +38 -0
- data/sig/docker_engine/models/auth_response.rbs +17 -0
- data/sig/docker_engine/models/config.rbs +225 -0
- data/sig/docker_engine/models/container.rbs +1973 -0
- data/sig/docker_engine/models/container_create_params.rbs +1352 -0
- data/sig/docker_engine/models/container_delete_params.rbs +38 -0
- data/sig/docker_engine/models/container_inspect_params.rbs +25 -0
- data/sig/docker_engine/models/container_kill_params.rbs +25 -0
- data/sig/docker_engine/models/container_list_params.rbs +44 -0
- data/sig/docker_engine/models/container_list_response.rbs +7 -0
- data/sig/docker_engine/models/container_logs_params.rbs +70 -0
- data/sig/docker_engine/models/container_start_params.rbs +25 -0
- data/sig/docker_engine/models/container_stop_params.rbs +32 -0
- data/sig/docker_engine/models/create_request.rbs +255 -0
- data/sig/docker_engine/models/create_response.rbs +15 -0
- data/sig/docker_engine/models/error.rbs +13 -0
- data/sig/docker_engine/models/image.rbs +1038 -0
- data/sig/docker_engine/models/image_delete_params.rbs +38 -0
- data/sig/docker_engine/models/image_delete_response.rbs +24 -0
- data/sig/docker_engine/models/image_inspect_params.rbs +25 -0
- data/sig/docker_engine/models/image_list_params.rbs +56 -0
- data/sig/docker_engine/models/image_list_response.rbs +7 -0
- data/sig/docker_engine/models/image_pull_params.rbs +84 -0
- data/sig/docker_engine/models/network.rbs +236 -0
- data/sig/docker_engine/models/network_create_params.rbs +203 -0
- data/sig/docker_engine/models/network_create_response.rbs +15 -0
- data/sig/docker_engine/models/network_delete_params.rbs +15 -0
- data/sig/docker_engine/models/network_inspect_params.rbs +32 -0
- data/sig/docker_engine/models/network_inspect_response.rbs +149 -0
- data/sig/docker_engine/models/network_list_params.rbs +25 -0
- data/sig/docker_engine/models/network_list_response.rbs +7 -0
- data/sig/docker_engine/models/service.rbs +471 -0
- data/sig/docker_engine/models/service_create_params.rbs +38 -0
- data/sig/docker_engine/models/service_create_response.rbs +17 -0
- data/sig/docker_engine/models/service_delete_params.rbs +15 -0
- data/sig/docker_engine/models/service_inspect_params.rbs +26 -0
- data/sig/docker_engine/models/service_list_params.rbs +32 -0
- data/sig/docker_engine/models/service_list_response.rbs +7 -0
- data/sig/docker_engine/models/spec.rbs +1984 -0
- data/sig/docker_engine/models/summary.rbs +634 -0
- data/sig/docker_engine/models/system_info_params.rbs +15 -0
- data/sig/docker_engine/models/system_info_response.rbs +1380 -0
- data/sig/docker_engine/models/system_ping_params.rbs +15 -0
- data/sig/docker_engine/models/system_ping_response.rbs +5 -0
- data/sig/docker_engine/models/system_version_params.rbs +15 -0
- data/sig/docker_engine/models/system_version_response.rbs +127 -0
- data/sig/docker_engine/models/volume.rbs +478 -0
- data/sig/docker_engine/models/volume_create_params.rbs +15 -0
- data/sig/docker_engine/models/volume_delete_params.rbs +25 -0
- data/sig/docker_engine/models/volume_inspect_params.rbs +15 -0
- data/sig/docker_engine/models/volume_list_params.rbs +25 -0
- data/sig/docker_engine/models/volume_list_response.rbs +28 -0
- data/sig/docker_engine/models.rbs +81 -0
- data/sig/docker_engine/request_options.rbs +36 -0
- data/sig/docker_engine/resources/auth.rbs +14 -0
- data/sig/docker_engine/resources/containers.rbs +67 -0
- data/sig/docker_engine/resources/images.rbs +43 -0
- data/sig/docker_engine/resources/networks.rbs +41 -0
- data/sig/docker_engine/resources/services.rbs +30 -0
- data/sig/docker_engine/resources/system.rbs +17 -0
- data/sig/docker_engine/resources/volumes.rbs +28 -0
- data/sig/docker_engine/version.rbs +3 -0
- metadata +319 -0
|
@@ -0,0 +1,3297 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module DockerEngine
|
|
4
|
+
module Models
|
|
5
|
+
class ContainerCreateParams < DockerEngine::Internal::Type::BaseModel
|
|
6
|
+
extend DockerEngine::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include DockerEngine::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
DockerEngine::ContainerCreateParams,
|
|
13
|
+
DockerEngine::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Configuration for a container that is portable between hosts.
|
|
18
|
+
sig { returns(DockerEngine::ContainerCreateParams::Config) }
|
|
19
|
+
attr_reader :config
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(config: DockerEngine::ContainerCreateParams::Config::OrHash).void
|
|
23
|
+
end
|
|
24
|
+
attr_writer :config
|
|
25
|
+
|
|
26
|
+
# Assign the specified name to the container. Must match
|
|
27
|
+
# `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_reader :name
|
|
30
|
+
|
|
31
|
+
sig { params(name: String).void }
|
|
32
|
+
attr_writer :name
|
|
33
|
+
|
|
34
|
+
# Platform in the format `os[/arch[/variant]]` used for image lookup.
|
|
35
|
+
#
|
|
36
|
+
# When specified, the daemon checks if the requested image is present in the local
|
|
37
|
+
# image cache with the given OS and Architecture, and otherwise returns a `404`
|
|
38
|
+
# status.
|
|
39
|
+
#
|
|
40
|
+
# If the option is not set, the host's native OS and Architecture are used to look
|
|
41
|
+
# up the image in the image cache. However, if no platform is passed and the given
|
|
42
|
+
# image does exist in the local image cache, but its OS or architecture does not
|
|
43
|
+
# match, the container is created with the available image, and a warning is added
|
|
44
|
+
# to the `Warnings` field in the response, for example;
|
|
45
|
+
#
|
|
46
|
+
# WARNING: The requested image's platform (linux/arm64/v8) does not
|
|
47
|
+
# match the detected host platform (linux/amd64) and no
|
|
48
|
+
# specific platform was requested
|
|
49
|
+
sig { returns(T.nilable(String)) }
|
|
50
|
+
attr_reader :platform
|
|
51
|
+
|
|
52
|
+
sig { params(platform: String).void }
|
|
53
|
+
attr_writer :platform
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
params(
|
|
57
|
+
config: DockerEngine::ContainerCreateParams::Config::OrHash,
|
|
58
|
+
name: String,
|
|
59
|
+
platform: String,
|
|
60
|
+
request_options: DockerEngine::RequestOptions::OrHash
|
|
61
|
+
).returns(T.attached_class)
|
|
62
|
+
end
|
|
63
|
+
def self.new(
|
|
64
|
+
# Configuration for a container that is portable between hosts.
|
|
65
|
+
config:,
|
|
66
|
+
# Assign the specified name to the container. Must match
|
|
67
|
+
# `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
|
|
68
|
+
name: nil,
|
|
69
|
+
# Platform in the format `os[/arch[/variant]]` used for image lookup.
|
|
70
|
+
#
|
|
71
|
+
# When specified, the daemon checks if the requested image is present in the local
|
|
72
|
+
# image cache with the given OS and Architecture, and otherwise returns a `404`
|
|
73
|
+
# status.
|
|
74
|
+
#
|
|
75
|
+
# If the option is not set, the host's native OS and Architecture are used to look
|
|
76
|
+
# up the image in the image cache. However, if no platform is passed and the given
|
|
77
|
+
# image does exist in the local image cache, but its OS or architecture does not
|
|
78
|
+
# match, the container is created with the available image, and a warning is added
|
|
79
|
+
# to the `Warnings` field in the response, for example;
|
|
80
|
+
#
|
|
81
|
+
# WARNING: The requested image's platform (linux/arm64/v8) does not
|
|
82
|
+
# match the detected host platform (linux/amd64) and no
|
|
83
|
+
# specific platform was requested
|
|
84
|
+
platform: nil,
|
|
85
|
+
request_options: {}
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
sig do
|
|
90
|
+
override.returns(
|
|
91
|
+
{
|
|
92
|
+
config: DockerEngine::ContainerCreateParams::Config,
|
|
93
|
+
name: String,
|
|
94
|
+
platform: String,
|
|
95
|
+
request_options: DockerEngine::RequestOptions
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
def to_hash
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
class Config < DockerEngine::Models::Config
|
|
103
|
+
OrHash =
|
|
104
|
+
T.type_alias do
|
|
105
|
+
T.any(
|
|
106
|
+
DockerEngine::ContainerCreateParams::Config,
|
|
107
|
+
DockerEngine::Internal::AnyHash
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Container configuration that depends on the host we are running on
|
|
112
|
+
sig do
|
|
113
|
+
returns(
|
|
114
|
+
T.nilable(DockerEngine::ContainerCreateParams::Config::HostConfig)
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
attr_reader :host_config
|
|
118
|
+
|
|
119
|
+
sig do
|
|
120
|
+
params(
|
|
121
|
+
host_config:
|
|
122
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::OrHash
|
|
123
|
+
).void
|
|
124
|
+
end
|
|
125
|
+
attr_writer :host_config
|
|
126
|
+
|
|
127
|
+
# NetworkingConfig represents the container's networking configuration for each of
|
|
128
|
+
# its interfaces. It is used for the networking configs specified in the
|
|
129
|
+
# `docker create` and `docker network connect` commands.
|
|
130
|
+
sig do
|
|
131
|
+
returns(
|
|
132
|
+
T.nilable(
|
|
133
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig
|
|
134
|
+
)
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
attr_reader :networking_config
|
|
138
|
+
|
|
139
|
+
sig do
|
|
140
|
+
params(
|
|
141
|
+
networking_config:
|
|
142
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::OrHash
|
|
143
|
+
).void
|
|
144
|
+
end
|
|
145
|
+
attr_writer :networking_config
|
|
146
|
+
|
|
147
|
+
# Configuration for a container that is portable between hosts.
|
|
148
|
+
sig do
|
|
149
|
+
params(
|
|
150
|
+
host_config:
|
|
151
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::OrHash,
|
|
152
|
+
networking_config:
|
|
153
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::OrHash
|
|
154
|
+
).returns(T.attached_class)
|
|
155
|
+
end
|
|
156
|
+
def self.new(
|
|
157
|
+
# Container configuration that depends on the host we are running on
|
|
158
|
+
host_config: nil,
|
|
159
|
+
# NetworkingConfig represents the container's networking configuration for each of
|
|
160
|
+
# its interfaces. It is used for the networking configs specified in the
|
|
161
|
+
# `docker create` and `docker network connect` commands.
|
|
162
|
+
networking_config: nil
|
|
163
|
+
)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
sig do
|
|
167
|
+
override.returns(
|
|
168
|
+
{
|
|
169
|
+
host_config:
|
|
170
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig,
|
|
171
|
+
networking_config:
|
|
172
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
def to_hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
class HostConfig < DockerEngine::Internal::Type::BaseModel
|
|
180
|
+
OrHash =
|
|
181
|
+
T.type_alias do
|
|
182
|
+
T.any(
|
|
183
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig,
|
|
184
|
+
DockerEngine::Internal::AnyHash
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Arbitrary non-identifying metadata attached to container and provided to the
|
|
189
|
+
# runtime when the container is started.
|
|
190
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
191
|
+
attr_reader :annotations
|
|
192
|
+
|
|
193
|
+
sig { params(annotations: T::Hash[Symbol, String]).void }
|
|
194
|
+
attr_writer :annotations
|
|
195
|
+
|
|
196
|
+
# Automatically remove the container when the container's process exits. This has
|
|
197
|
+
# no effect if `RestartPolicy` is set.
|
|
198
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
199
|
+
attr_reader :auto_remove
|
|
200
|
+
|
|
201
|
+
sig { params(auto_remove: T::Boolean).void }
|
|
202
|
+
attr_writer :auto_remove
|
|
203
|
+
|
|
204
|
+
# A list of volume bindings for this container. Each volume binding is a string in
|
|
205
|
+
# one of these forms:
|
|
206
|
+
#
|
|
207
|
+
# - `host-src:container-dest[:options]` to bind-mount a host path into the
|
|
208
|
+
# container. Both `host-src`, and `container-dest` must be an _absolute_ path.
|
|
209
|
+
# - `volume-name:container-dest[:options]` to bind-mount a volume managed by a
|
|
210
|
+
# volume driver into the container. `container-dest` must be an _absolute_ path.
|
|
211
|
+
#
|
|
212
|
+
# `options` is an optional, comma-delimited list of:
|
|
213
|
+
#
|
|
214
|
+
# - `nocopy` disables automatic copying of data from the container path to the
|
|
215
|
+
# volume. The `nocopy` flag only applies to named volumes.
|
|
216
|
+
# - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or
|
|
217
|
+
# set to `rw`, volumes are mounted read-write.
|
|
218
|
+
# - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read
|
|
219
|
+
# and write to the same volume.
|
|
220
|
+
# - `z`: a _shared_ content label is applied to the content. This label
|
|
221
|
+
# indicates that multiple containers can share the volume content, for both
|
|
222
|
+
# reading and writing.
|
|
223
|
+
# - `Z`: a _private unshared_ label is applied to the content. This label
|
|
224
|
+
# indicates that only the current container can use a private volume. Labeling
|
|
225
|
+
# systems such as SELinux require proper labels to be placed on volume content
|
|
226
|
+
# that is mounted into a container. Without a label, the security system can
|
|
227
|
+
# prevent a container's processes from using the content. By default, the
|
|
228
|
+
# labels set by the host operating system are not modified.
|
|
229
|
+
# - `[[r]shared|[r]slave|[r]private]` specifies mount
|
|
230
|
+
# [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
|
|
231
|
+
# This only applies to bind-mounted volumes, not internal volumes or named
|
|
232
|
+
# volumes. Mount propagation requires the source mount point (the location where
|
|
233
|
+
# the source directory is mounted in the host operating system) to have the
|
|
234
|
+
# correct propagation properties. For shared volumes, the source mount point
|
|
235
|
+
# must be set to `shared`. For slave volumes, the mount must be set to either
|
|
236
|
+
# `shared` or `slave`.
|
|
237
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
238
|
+
attr_reader :binds
|
|
239
|
+
|
|
240
|
+
sig { params(binds: T::Array[String]).void }
|
|
241
|
+
attr_writer :binds
|
|
242
|
+
|
|
243
|
+
# Limit read rate (bytes per second) from a device, in the form:
|
|
244
|
+
#
|
|
245
|
+
# ```
|
|
246
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
247
|
+
# ```
|
|
248
|
+
sig do
|
|
249
|
+
returns(
|
|
250
|
+
T.nilable(
|
|
251
|
+
T::Array[
|
|
252
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp
|
|
253
|
+
]
|
|
254
|
+
)
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
attr_reader :blkio_device_read_bps
|
|
258
|
+
|
|
259
|
+
sig do
|
|
260
|
+
params(
|
|
261
|
+
blkio_device_read_bps:
|
|
262
|
+
T::Array[
|
|
263
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp::OrHash
|
|
264
|
+
]
|
|
265
|
+
).void
|
|
266
|
+
end
|
|
267
|
+
attr_writer :blkio_device_read_bps
|
|
268
|
+
|
|
269
|
+
# Limit read rate (IO per second) from a device, in the form:
|
|
270
|
+
#
|
|
271
|
+
# ```
|
|
272
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
273
|
+
# ```
|
|
274
|
+
sig do
|
|
275
|
+
returns(
|
|
276
|
+
T.nilable(
|
|
277
|
+
T::Array[
|
|
278
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp
|
|
279
|
+
]
|
|
280
|
+
)
|
|
281
|
+
)
|
|
282
|
+
end
|
|
283
|
+
attr_reader :blkio_device_read_i_ops
|
|
284
|
+
|
|
285
|
+
sig do
|
|
286
|
+
params(
|
|
287
|
+
blkio_device_read_i_ops:
|
|
288
|
+
T::Array[
|
|
289
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp::OrHash
|
|
290
|
+
]
|
|
291
|
+
).void
|
|
292
|
+
end
|
|
293
|
+
attr_writer :blkio_device_read_i_ops
|
|
294
|
+
|
|
295
|
+
# Limit write rate (bytes per second) to a device, in the form:
|
|
296
|
+
#
|
|
297
|
+
# ```
|
|
298
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
299
|
+
# ```
|
|
300
|
+
sig do
|
|
301
|
+
returns(
|
|
302
|
+
T.nilable(
|
|
303
|
+
T::Array[
|
|
304
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
attr_reader :blkio_device_write_bps
|
|
310
|
+
|
|
311
|
+
sig do
|
|
312
|
+
params(
|
|
313
|
+
blkio_device_write_bps:
|
|
314
|
+
T::Array[
|
|
315
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp::OrHash
|
|
316
|
+
]
|
|
317
|
+
).void
|
|
318
|
+
end
|
|
319
|
+
attr_writer :blkio_device_write_bps
|
|
320
|
+
|
|
321
|
+
# Limit write rate (IO per second) to a device, in the form:
|
|
322
|
+
#
|
|
323
|
+
# ```
|
|
324
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
325
|
+
# ```
|
|
326
|
+
sig do
|
|
327
|
+
returns(
|
|
328
|
+
T.nilable(
|
|
329
|
+
T::Array[
|
|
330
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp
|
|
331
|
+
]
|
|
332
|
+
)
|
|
333
|
+
)
|
|
334
|
+
end
|
|
335
|
+
attr_reader :blkio_device_write_i_ops
|
|
336
|
+
|
|
337
|
+
sig do
|
|
338
|
+
params(
|
|
339
|
+
blkio_device_write_i_ops:
|
|
340
|
+
T::Array[
|
|
341
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp::OrHash
|
|
342
|
+
]
|
|
343
|
+
).void
|
|
344
|
+
end
|
|
345
|
+
attr_writer :blkio_device_write_i_ops
|
|
346
|
+
|
|
347
|
+
# Block IO weight (relative weight).
|
|
348
|
+
sig { returns(T.nilable(Integer)) }
|
|
349
|
+
attr_reader :blkio_weight
|
|
350
|
+
|
|
351
|
+
sig { params(blkio_weight: Integer).void }
|
|
352
|
+
attr_writer :blkio_weight
|
|
353
|
+
|
|
354
|
+
# Block IO weight (relative device weight) in the form:
|
|
355
|
+
#
|
|
356
|
+
# ```
|
|
357
|
+
# [{"Path": "device_path", "Weight": weight}]
|
|
358
|
+
# ```
|
|
359
|
+
sig do
|
|
360
|
+
returns(
|
|
361
|
+
T.nilable(
|
|
362
|
+
T::Array[
|
|
363
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice
|
|
364
|
+
]
|
|
365
|
+
)
|
|
366
|
+
)
|
|
367
|
+
end
|
|
368
|
+
attr_reader :blkio_weight_device
|
|
369
|
+
|
|
370
|
+
sig do
|
|
371
|
+
params(
|
|
372
|
+
blkio_weight_device:
|
|
373
|
+
T::Array[
|
|
374
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice::OrHash
|
|
375
|
+
]
|
|
376
|
+
).void
|
|
377
|
+
end
|
|
378
|
+
attr_writer :blkio_weight_device
|
|
379
|
+
|
|
380
|
+
# A list of kernel capabilities to add to the container. Conflicts with option
|
|
381
|
+
# 'Capabilities'.
|
|
382
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
383
|
+
attr_reader :cap_add
|
|
384
|
+
|
|
385
|
+
sig { params(cap_add: T::Array[String]).void }
|
|
386
|
+
attr_writer :cap_add
|
|
387
|
+
|
|
388
|
+
# A list of kernel capabilities to drop from the container. Conflicts with option
|
|
389
|
+
# 'Capabilities'.
|
|
390
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
391
|
+
attr_reader :cap_drop
|
|
392
|
+
|
|
393
|
+
sig { params(cap_drop: T::Array[String]).void }
|
|
394
|
+
attr_writer :cap_drop
|
|
395
|
+
|
|
396
|
+
# Cgroup to use for the container.
|
|
397
|
+
sig { returns(T.nilable(String)) }
|
|
398
|
+
attr_reader :cgroup
|
|
399
|
+
|
|
400
|
+
sig { params(cgroup: String).void }
|
|
401
|
+
attr_writer :cgroup
|
|
402
|
+
|
|
403
|
+
# cgroup namespace mode for the container. Possible values are:
|
|
404
|
+
#
|
|
405
|
+
# - `"private"`: the container runs in its own private cgroup namespace
|
|
406
|
+
# - `"host"`: use the host system's cgroup namespace
|
|
407
|
+
#
|
|
408
|
+
# If not specified, the daemon default is used, which can either be `"private"` or
|
|
409
|
+
# `"host"`, depending on daemon version, kernel support and configuration.
|
|
410
|
+
sig do
|
|
411
|
+
returns(
|
|
412
|
+
T.nilable(
|
|
413
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::OrSymbol
|
|
414
|
+
)
|
|
415
|
+
)
|
|
416
|
+
end
|
|
417
|
+
attr_reader :cgroupns_mode
|
|
418
|
+
|
|
419
|
+
sig do
|
|
420
|
+
params(
|
|
421
|
+
cgroupns_mode:
|
|
422
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::OrSymbol
|
|
423
|
+
).void
|
|
424
|
+
end
|
|
425
|
+
attr_writer :cgroupns_mode
|
|
426
|
+
|
|
427
|
+
# Path to `cgroups` under which the container's `cgroup` is created. If the path
|
|
428
|
+
# is not absolute, the path is considered to be relative to the `cgroups` path of
|
|
429
|
+
# the init process. Cgroups are created if they do not already exist.
|
|
430
|
+
sig { returns(T.nilable(String)) }
|
|
431
|
+
attr_reader :cgroup_parent
|
|
432
|
+
|
|
433
|
+
sig { params(cgroup_parent: String).void }
|
|
434
|
+
attr_writer :cgroup_parent
|
|
435
|
+
|
|
436
|
+
# Initial console size, as an `[height, width]` array.
|
|
437
|
+
sig { returns(T.nilable(T::Array[Integer])) }
|
|
438
|
+
attr_accessor :console_size
|
|
439
|
+
|
|
440
|
+
# Path to a file where the container ID is written
|
|
441
|
+
sig { returns(T.nilable(String)) }
|
|
442
|
+
attr_reader :container_id_file
|
|
443
|
+
|
|
444
|
+
sig { params(container_id_file: String).void }
|
|
445
|
+
attr_writer :container_id_file
|
|
446
|
+
|
|
447
|
+
# The number of usable CPUs (Windows only).
|
|
448
|
+
#
|
|
449
|
+
# On Windows Server containers, the processor resource controls are mutually
|
|
450
|
+
# exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
|
|
451
|
+
# `CPUPercent` last.
|
|
452
|
+
sig { returns(T.nilable(Integer)) }
|
|
453
|
+
attr_reader :cpu_count
|
|
454
|
+
|
|
455
|
+
sig { params(cpu_count: Integer).void }
|
|
456
|
+
attr_writer :cpu_count
|
|
457
|
+
|
|
458
|
+
# The usable percentage of the available CPUs (Windows only).
|
|
459
|
+
#
|
|
460
|
+
# On Windows Server containers, the processor resource controls are mutually
|
|
461
|
+
# exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
|
|
462
|
+
# `CPUPercent` last.
|
|
463
|
+
sig { returns(T.nilable(Integer)) }
|
|
464
|
+
attr_reader :cpu_percent
|
|
465
|
+
|
|
466
|
+
sig { params(cpu_percent: Integer).void }
|
|
467
|
+
attr_writer :cpu_percent
|
|
468
|
+
|
|
469
|
+
# The length of a CPU period in microseconds.
|
|
470
|
+
sig { returns(T.nilable(Integer)) }
|
|
471
|
+
attr_reader :cpu_period
|
|
472
|
+
|
|
473
|
+
sig { params(cpu_period: Integer).void }
|
|
474
|
+
attr_writer :cpu_period
|
|
475
|
+
|
|
476
|
+
# Microseconds of CPU time that the container can get in a CPU period.
|
|
477
|
+
sig { returns(T.nilable(Integer)) }
|
|
478
|
+
attr_reader :cpu_quota
|
|
479
|
+
|
|
480
|
+
sig { params(cpu_quota: Integer).void }
|
|
481
|
+
attr_writer :cpu_quota
|
|
482
|
+
|
|
483
|
+
# The length of a CPU real-time period in microseconds. Set to 0 to allocate no
|
|
484
|
+
# time allocated to real-time tasks.
|
|
485
|
+
sig { returns(T.nilable(Integer)) }
|
|
486
|
+
attr_reader :cpu_realtime_period
|
|
487
|
+
|
|
488
|
+
sig { params(cpu_realtime_period: Integer).void }
|
|
489
|
+
attr_writer :cpu_realtime_period
|
|
490
|
+
|
|
491
|
+
# The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no
|
|
492
|
+
# time allocated to real-time tasks.
|
|
493
|
+
sig { returns(T.nilable(Integer)) }
|
|
494
|
+
attr_reader :cpu_realtime_runtime
|
|
495
|
+
|
|
496
|
+
sig { params(cpu_realtime_runtime: Integer).void }
|
|
497
|
+
attr_writer :cpu_realtime_runtime
|
|
498
|
+
|
|
499
|
+
# CPUs in which to allow execution (e.g., `0-3`, `0,1`).
|
|
500
|
+
sig { returns(T.nilable(String)) }
|
|
501
|
+
attr_reader :cpuset_cpus
|
|
502
|
+
|
|
503
|
+
sig { params(cpuset_cpus: String).void }
|
|
504
|
+
attr_writer :cpuset_cpus
|
|
505
|
+
|
|
506
|
+
# Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
|
|
507
|
+
# NUMA systems.
|
|
508
|
+
sig { returns(T.nilable(String)) }
|
|
509
|
+
attr_reader :cpuset_mems
|
|
510
|
+
|
|
511
|
+
sig { params(cpuset_mems: String).void }
|
|
512
|
+
attr_writer :cpuset_mems
|
|
513
|
+
|
|
514
|
+
# An integer value representing this container's relative CPU weight versus other
|
|
515
|
+
# containers.
|
|
516
|
+
sig { returns(T.nilable(Integer)) }
|
|
517
|
+
attr_reader :cpu_shares
|
|
518
|
+
|
|
519
|
+
sig { params(cpu_shares: Integer).void }
|
|
520
|
+
attr_writer :cpu_shares
|
|
521
|
+
|
|
522
|
+
# a list of cgroup rules to apply to the container
|
|
523
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
524
|
+
attr_reader :device_cgroup_rules
|
|
525
|
+
|
|
526
|
+
sig { params(device_cgroup_rules: T::Array[String]).void }
|
|
527
|
+
attr_writer :device_cgroup_rules
|
|
528
|
+
|
|
529
|
+
# A list of requests for devices to be sent to device drivers.
|
|
530
|
+
sig do
|
|
531
|
+
returns(
|
|
532
|
+
T.nilable(
|
|
533
|
+
T::Array[
|
|
534
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::DeviceRequest
|
|
535
|
+
]
|
|
536
|
+
)
|
|
537
|
+
)
|
|
538
|
+
end
|
|
539
|
+
attr_reader :device_requests
|
|
540
|
+
|
|
541
|
+
sig do
|
|
542
|
+
params(
|
|
543
|
+
device_requests:
|
|
544
|
+
T::Array[
|
|
545
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::DeviceRequest::OrHash
|
|
546
|
+
]
|
|
547
|
+
).void
|
|
548
|
+
end
|
|
549
|
+
attr_writer :device_requests
|
|
550
|
+
|
|
551
|
+
# A list of devices to add to the container.
|
|
552
|
+
sig do
|
|
553
|
+
returns(
|
|
554
|
+
T.nilable(
|
|
555
|
+
T::Array[
|
|
556
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Device
|
|
557
|
+
]
|
|
558
|
+
)
|
|
559
|
+
)
|
|
560
|
+
end
|
|
561
|
+
attr_reader :devices
|
|
562
|
+
|
|
563
|
+
sig do
|
|
564
|
+
params(
|
|
565
|
+
devices:
|
|
566
|
+
T::Array[
|
|
567
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Device::OrHash
|
|
568
|
+
]
|
|
569
|
+
).void
|
|
570
|
+
end
|
|
571
|
+
attr_writer :devices
|
|
572
|
+
|
|
573
|
+
# A list of DNS servers for the container to use.
|
|
574
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
575
|
+
attr_reader :dns
|
|
576
|
+
|
|
577
|
+
sig { params(dns: T::Array[String]).void }
|
|
578
|
+
attr_writer :dns
|
|
579
|
+
|
|
580
|
+
# A list of DNS options.
|
|
581
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
582
|
+
attr_reader :dns_options
|
|
583
|
+
|
|
584
|
+
sig { params(dns_options: T::Array[String]).void }
|
|
585
|
+
attr_writer :dns_options
|
|
586
|
+
|
|
587
|
+
# A list of DNS search domains.
|
|
588
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
589
|
+
attr_reader :dns_search
|
|
590
|
+
|
|
591
|
+
sig { params(dns_search: T::Array[String]).void }
|
|
592
|
+
attr_writer :dns_search
|
|
593
|
+
|
|
594
|
+
# A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
|
|
595
|
+
# Specified in the form `["hostname:IP"]`.
|
|
596
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
597
|
+
attr_reader :extra_hosts
|
|
598
|
+
|
|
599
|
+
sig { params(extra_hosts: T::Array[String]).void }
|
|
600
|
+
attr_writer :extra_hosts
|
|
601
|
+
|
|
602
|
+
# A list of additional groups that the container process will run as.
|
|
603
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
604
|
+
attr_reader :group_add
|
|
605
|
+
|
|
606
|
+
sig { params(group_add: T::Array[String]).void }
|
|
607
|
+
attr_writer :group_add
|
|
608
|
+
|
|
609
|
+
# Run an init inside the container that forwards signals and reaps processes. This
|
|
610
|
+
# field is omitted if empty, and the default (as configured on the daemon) is
|
|
611
|
+
# used.
|
|
612
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
613
|
+
attr_accessor :init
|
|
614
|
+
|
|
615
|
+
# Maximum IO in bytes per second for the container system drive (Windows only).
|
|
616
|
+
sig { returns(T.nilable(Integer)) }
|
|
617
|
+
attr_reader :io_maximum_bandwidth
|
|
618
|
+
|
|
619
|
+
sig { params(io_maximum_bandwidth: Integer).void }
|
|
620
|
+
attr_writer :io_maximum_bandwidth
|
|
621
|
+
|
|
622
|
+
# Maximum IOps for the container system drive (Windows only)
|
|
623
|
+
sig { returns(T.nilable(Integer)) }
|
|
624
|
+
attr_reader :io_maximum_i_ops
|
|
625
|
+
|
|
626
|
+
sig { params(io_maximum_i_ops: Integer).void }
|
|
627
|
+
attr_writer :io_maximum_i_ops
|
|
628
|
+
|
|
629
|
+
# IPC sharing mode for the container. Possible values are:
|
|
630
|
+
#
|
|
631
|
+
# - `"none"`: own private IPC namespace, with /dev/shm not mounted
|
|
632
|
+
# - `"private"`: own private IPC namespace
|
|
633
|
+
# - `"shareable"`: own private IPC namespace, with a possibility to share it with
|
|
634
|
+
# other containers
|
|
635
|
+
# - `"container:<name|id>"`: join another (shareable) container's IPC namespace
|
|
636
|
+
# - `"host"`: use the host system's IPC namespace
|
|
637
|
+
#
|
|
638
|
+
# If not specified, daemon default is used, which can either be `"private"` or
|
|
639
|
+
# `"shareable"`, depending on daemon version and configuration.
|
|
640
|
+
sig { returns(T.nilable(String)) }
|
|
641
|
+
attr_reader :ipc_mode
|
|
642
|
+
|
|
643
|
+
sig { params(ipc_mode: String).void }
|
|
644
|
+
attr_writer :ipc_mode
|
|
645
|
+
|
|
646
|
+
# Isolation technology of the container. (Windows only)
|
|
647
|
+
sig do
|
|
648
|
+
returns(
|
|
649
|
+
T.nilable(
|
|
650
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::OrSymbol
|
|
651
|
+
)
|
|
652
|
+
)
|
|
653
|
+
end
|
|
654
|
+
attr_reader :isolation
|
|
655
|
+
|
|
656
|
+
sig do
|
|
657
|
+
params(
|
|
658
|
+
isolation:
|
|
659
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::OrSymbol
|
|
660
|
+
).void
|
|
661
|
+
end
|
|
662
|
+
attr_writer :isolation
|
|
663
|
+
|
|
664
|
+
# A list of links for the container in the form `container_name:alias`.
|
|
665
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
666
|
+
attr_reader :links
|
|
667
|
+
|
|
668
|
+
sig { params(links: T::Array[String]).void }
|
|
669
|
+
attr_writer :links
|
|
670
|
+
|
|
671
|
+
# The logging configuration for this container
|
|
672
|
+
sig do
|
|
673
|
+
returns(
|
|
674
|
+
T.nilable(
|
|
675
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig
|
|
676
|
+
)
|
|
677
|
+
)
|
|
678
|
+
end
|
|
679
|
+
attr_reader :log_config
|
|
680
|
+
|
|
681
|
+
sig do
|
|
682
|
+
params(
|
|
683
|
+
log_config:
|
|
684
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::OrHash
|
|
685
|
+
).void
|
|
686
|
+
end
|
|
687
|
+
attr_writer :log_config
|
|
688
|
+
|
|
689
|
+
# The list of paths to be masked inside the container (this overrides the default
|
|
690
|
+
# set of paths).
|
|
691
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
692
|
+
attr_reader :masked_paths
|
|
693
|
+
|
|
694
|
+
sig { params(masked_paths: T::Array[String]).void }
|
|
695
|
+
attr_writer :masked_paths
|
|
696
|
+
|
|
697
|
+
# Memory limit in bytes.
|
|
698
|
+
sig { returns(T.nilable(Integer)) }
|
|
699
|
+
attr_reader :memory
|
|
700
|
+
|
|
701
|
+
sig { params(memory: Integer).void }
|
|
702
|
+
attr_writer :memory
|
|
703
|
+
|
|
704
|
+
# Memory soft limit in bytes.
|
|
705
|
+
sig { returns(T.nilable(Integer)) }
|
|
706
|
+
attr_reader :memory_reservation
|
|
707
|
+
|
|
708
|
+
sig { params(memory_reservation: Integer).void }
|
|
709
|
+
attr_writer :memory_reservation
|
|
710
|
+
|
|
711
|
+
# Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.
|
|
712
|
+
sig { returns(T.nilable(Integer)) }
|
|
713
|
+
attr_reader :memory_swap
|
|
714
|
+
|
|
715
|
+
sig { params(memory_swap: Integer).void }
|
|
716
|
+
attr_writer :memory_swap
|
|
717
|
+
|
|
718
|
+
# Tune a container's memory swappiness behavior. Accepts an integer between 0
|
|
719
|
+
# and 100.
|
|
720
|
+
sig { returns(T.nilable(Integer)) }
|
|
721
|
+
attr_reader :memory_swappiness
|
|
722
|
+
|
|
723
|
+
sig { params(memory_swappiness: Integer).void }
|
|
724
|
+
attr_writer :memory_swappiness
|
|
725
|
+
|
|
726
|
+
# Specification for mounts to be added to the container.
|
|
727
|
+
sig do
|
|
728
|
+
returns(
|
|
729
|
+
T.nilable(
|
|
730
|
+
T::Array[
|
|
731
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount
|
|
732
|
+
]
|
|
733
|
+
)
|
|
734
|
+
)
|
|
735
|
+
end
|
|
736
|
+
attr_reader :mounts
|
|
737
|
+
|
|
738
|
+
sig do
|
|
739
|
+
params(
|
|
740
|
+
mounts:
|
|
741
|
+
T::Array[
|
|
742
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::OrHash
|
|
743
|
+
]
|
|
744
|
+
).void
|
|
745
|
+
end
|
|
746
|
+
attr_writer :mounts
|
|
747
|
+
|
|
748
|
+
# CPU quota in units of 10<sup>-9</sup> CPUs.
|
|
749
|
+
sig { returns(T.nilable(Integer)) }
|
|
750
|
+
attr_reader :nano_cpus
|
|
751
|
+
|
|
752
|
+
sig { params(nano_cpus: Integer).void }
|
|
753
|
+
attr_writer :nano_cpus
|
|
754
|
+
|
|
755
|
+
# Network mode to use for this container. Supported standard values are: `bridge`,
|
|
756
|
+
# `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom
|
|
757
|
+
# network's name to which this container should connect to.
|
|
758
|
+
sig { returns(T.nilable(String)) }
|
|
759
|
+
attr_reader :network_mode
|
|
760
|
+
|
|
761
|
+
sig { params(network_mode: String).void }
|
|
762
|
+
attr_writer :network_mode
|
|
763
|
+
|
|
764
|
+
# Disable OOM Killer for the container.
|
|
765
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
766
|
+
attr_reader :oom_kill_disable
|
|
767
|
+
|
|
768
|
+
sig { params(oom_kill_disable: T::Boolean).void }
|
|
769
|
+
attr_writer :oom_kill_disable
|
|
770
|
+
|
|
771
|
+
# An integer value containing the score given to the container in order to tune
|
|
772
|
+
# OOM killer preferences.
|
|
773
|
+
sig { returns(T.nilable(Integer)) }
|
|
774
|
+
attr_reader :oom_score_adj
|
|
775
|
+
|
|
776
|
+
sig { params(oom_score_adj: Integer).void }
|
|
777
|
+
attr_writer :oom_score_adj
|
|
778
|
+
|
|
779
|
+
# Set the PID (Process) Namespace mode for the container. It can be either:
|
|
780
|
+
#
|
|
781
|
+
# - `"container:<name|id>"`: joins another container's PID namespace
|
|
782
|
+
# - `"host"`: use the host's PID namespace inside the container
|
|
783
|
+
sig { returns(T.nilable(String)) }
|
|
784
|
+
attr_reader :pid_mode
|
|
785
|
+
|
|
786
|
+
sig { params(pid_mode: String).void }
|
|
787
|
+
attr_writer :pid_mode
|
|
788
|
+
|
|
789
|
+
# Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not
|
|
790
|
+
# change.
|
|
791
|
+
sig { returns(T.nilable(Integer)) }
|
|
792
|
+
attr_accessor :pids_limit
|
|
793
|
+
|
|
794
|
+
# PortMap describes the mapping of container ports to host ports, using the
|
|
795
|
+
# container's port-number and protocol as key in the format `<port>/<protocol>`,
|
|
796
|
+
# for example, `80/udp`.
|
|
797
|
+
#
|
|
798
|
+
# If a container's port is mapped for multiple protocols, separate entries are
|
|
799
|
+
# added to the mapping table.
|
|
800
|
+
sig do
|
|
801
|
+
returns(
|
|
802
|
+
T.nilable(
|
|
803
|
+
T::Hash[
|
|
804
|
+
Symbol,
|
|
805
|
+
T::Array[
|
|
806
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::PortBinding
|
|
807
|
+
]
|
|
808
|
+
]
|
|
809
|
+
)
|
|
810
|
+
)
|
|
811
|
+
end
|
|
812
|
+
attr_reader :port_bindings
|
|
813
|
+
|
|
814
|
+
sig do
|
|
815
|
+
params(
|
|
816
|
+
port_bindings:
|
|
817
|
+
T::Hash[
|
|
818
|
+
Symbol,
|
|
819
|
+
T::Array[
|
|
820
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::PortBinding::OrHash
|
|
821
|
+
]
|
|
822
|
+
]
|
|
823
|
+
).void
|
|
824
|
+
end
|
|
825
|
+
attr_writer :port_bindings
|
|
826
|
+
|
|
827
|
+
# Gives the container full access to the host.
|
|
828
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
829
|
+
attr_reader :privileged
|
|
830
|
+
|
|
831
|
+
sig { params(privileged: T::Boolean).void }
|
|
832
|
+
attr_writer :privileged
|
|
833
|
+
|
|
834
|
+
# Allocates an ephemeral host port for all of a container's exposed ports.
|
|
835
|
+
#
|
|
836
|
+
# Ports are de-allocated when the container stops and allocated when the container
|
|
837
|
+
# starts. The allocated port might be changed when restarting the container.
|
|
838
|
+
#
|
|
839
|
+
# The port is selected from the ephemeral port range that depends on the kernel.
|
|
840
|
+
# For example, on Linux the range is defined by
|
|
841
|
+
# `/proc/sys/net/ipv4/ip_local_port_range`.
|
|
842
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
843
|
+
attr_reader :publish_all_ports
|
|
844
|
+
|
|
845
|
+
sig { params(publish_all_ports: T::Boolean).void }
|
|
846
|
+
attr_writer :publish_all_ports
|
|
847
|
+
|
|
848
|
+
# The list of paths to be set as read-only inside the container (this overrides
|
|
849
|
+
# the default set of paths).
|
|
850
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
851
|
+
attr_reader :readonly_paths
|
|
852
|
+
|
|
853
|
+
sig { params(readonly_paths: T::Array[String]).void }
|
|
854
|
+
attr_writer :readonly_paths
|
|
855
|
+
|
|
856
|
+
# Mount the container's root filesystem as read only.
|
|
857
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
858
|
+
attr_reader :readonly_rootfs
|
|
859
|
+
|
|
860
|
+
sig { params(readonly_rootfs: T::Boolean).void }
|
|
861
|
+
attr_writer :readonly_rootfs
|
|
862
|
+
|
|
863
|
+
# The behavior to apply when the container exits. The default is not to restart.
|
|
864
|
+
#
|
|
865
|
+
# An ever increasing delay (double the previous delay, starting at 100ms) is added
|
|
866
|
+
# before each restart to prevent flooding the server.
|
|
867
|
+
sig do
|
|
868
|
+
returns(
|
|
869
|
+
T.nilable(
|
|
870
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy
|
|
871
|
+
)
|
|
872
|
+
)
|
|
873
|
+
end
|
|
874
|
+
attr_reader :restart_policy
|
|
875
|
+
|
|
876
|
+
sig do
|
|
877
|
+
params(
|
|
878
|
+
restart_policy:
|
|
879
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::OrHash
|
|
880
|
+
).void
|
|
881
|
+
end
|
|
882
|
+
attr_writer :restart_policy
|
|
883
|
+
|
|
884
|
+
# Runtime to use with this container.
|
|
885
|
+
sig { returns(T.nilable(String)) }
|
|
886
|
+
attr_accessor :runtime
|
|
887
|
+
|
|
888
|
+
# A list of string values to customize labels for MLS systems, such as SELinux.
|
|
889
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
890
|
+
attr_reader :security_opt
|
|
891
|
+
|
|
892
|
+
sig { params(security_opt: T::Array[String]).void }
|
|
893
|
+
attr_writer :security_opt
|
|
894
|
+
|
|
895
|
+
# Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
|
|
896
|
+
sig { returns(T.nilable(Integer)) }
|
|
897
|
+
attr_reader :shm_size
|
|
898
|
+
|
|
899
|
+
sig { params(shm_size: Integer).void }
|
|
900
|
+
attr_writer :shm_size
|
|
901
|
+
|
|
902
|
+
# Storage driver options for this container, in the form `{"size": "120G"}`.
|
|
903
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
904
|
+
attr_reader :storage_opt
|
|
905
|
+
|
|
906
|
+
sig { params(storage_opt: T::Hash[Symbol, String]).void }
|
|
907
|
+
attr_writer :storage_opt
|
|
908
|
+
|
|
909
|
+
# A list of kernel parameters (sysctls) to set in the container.
|
|
910
|
+
#
|
|
911
|
+
# This field is omitted if not set.
|
|
912
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
913
|
+
attr_accessor :sysctls
|
|
914
|
+
|
|
915
|
+
# A map of container directories which should be replaced by tmpfs mounts, and
|
|
916
|
+
# their corresponding mount options. For example:
|
|
917
|
+
#
|
|
918
|
+
# ```
|
|
919
|
+
# { "/run": "rw,noexec,nosuid,size=65536k" }
|
|
920
|
+
# ```
|
|
921
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
922
|
+
attr_reader :tmpfs
|
|
923
|
+
|
|
924
|
+
sig { params(tmpfs: T::Hash[Symbol, String]).void }
|
|
925
|
+
attr_writer :tmpfs
|
|
926
|
+
|
|
927
|
+
# A list of resource limits to set in the container. For example:
|
|
928
|
+
#
|
|
929
|
+
# ```
|
|
930
|
+
# {"Name": "nofile", "Soft": 1024, "Hard": 2048}
|
|
931
|
+
# ```
|
|
932
|
+
sig do
|
|
933
|
+
returns(
|
|
934
|
+
T.nilable(
|
|
935
|
+
T::Array[
|
|
936
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Ulimit
|
|
937
|
+
]
|
|
938
|
+
)
|
|
939
|
+
)
|
|
940
|
+
end
|
|
941
|
+
attr_reader :ulimits
|
|
942
|
+
|
|
943
|
+
sig do
|
|
944
|
+
params(
|
|
945
|
+
ulimits:
|
|
946
|
+
T::Array[
|
|
947
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Ulimit::OrHash
|
|
948
|
+
]
|
|
949
|
+
).void
|
|
950
|
+
end
|
|
951
|
+
attr_writer :ulimits
|
|
952
|
+
|
|
953
|
+
# Sets the usernamespace mode for the container when usernamespace remapping
|
|
954
|
+
# option is enabled.
|
|
955
|
+
sig { returns(T.nilable(String)) }
|
|
956
|
+
attr_reader :userns_mode
|
|
957
|
+
|
|
958
|
+
sig { params(userns_mode: String).void }
|
|
959
|
+
attr_writer :userns_mode
|
|
960
|
+
|
|
961
|
+
# UTS namespace to use for the container.
|
|
962
|
+
sig { returns(T.nilable(String)) }
|
|
963
|
+
attr_reader :uts_mode
|
|
964
|
+
|
|
965
|
+
sig { params(uts_mode: String).void }
|
|
966
|
+
attr_writer :uts_mode
|
|
967
|
+
|
|
968
|
+
# Driver that this container uses to mount volumes.
|
|
969
|
+
sig { returns(T.nilable(String)) }
|
|
970
|
+
attr_reader :volume_driver
|
|
971
|
+
|
|
972
|
+
sig { params(volume_driver: String).void }
|
|
973
|
+
attr_writer :volume_driver
|
|
974
|
+
|
|
975
|
+
# A list of volumes to inherit from another container, specified in the form
|
|
976
|
+
# `<container name>[:<ro|rw>]`.
|
|
977
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
978
|
+
attr_reader :volumes_from
|
|
979
|
+
|
|
980
|
+
sig { params(volumes_from: T::Array[String]).void }
|
|
981
|
+
attr_writer :volumes_from
|
|
982
|
+
|
|
983
|
+
# Container configuration that depends on the host we are running on
|
|
984
|
+
sig do
|
|
985
|
+
params(
|
|
986
|
+
annotations: T::Hash[Symbol, String],
|
|
987
|
+
auto_remove: T::Boolean,
|
|
988
|
+
binds: T::Array[String],
|
|
989
|
+
blkio_device_read_bps:
|
|
990
|
+
T::Array[
|
|
991
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp::OrHash
|
|
992
|
+
],
|
|
993
|
+
blkio_device_read_i_ops:
|
|
994
|
+
T::Array[
|
|
995
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp::OrHash
|
|
996
|
+
],
|
|
997
|
+
blkio_device_write_bps:
|
|
998
|
+
T::Array[
|
|
999
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp::OrHash
|
|
1000
|
+
],
|
|
1001
|
+
blkio_device_write_i_ops:
|
|
1002
|
+
T::Array[
|
|
1003
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp::OrHash
|
|
1004
|
+
],
|
|
1005
|
+
blkio_weight: Integer,
|
|
1006
|
+
blkio_weight_device:
|
|
1007
|
+
T::Array[
|
|
1008
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice::OrHash
|
|
1009
|
+
],
|
|
1010
|
+
cap_add: T::Array[String],
|
|
1011
|
+
cap_drop: T::Array[String],
|
|
1012
|
+
cgroup: String,
|
|
1013
|
+
cgroupns_mode:
|
|
1014
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::OrSymbol,
|
|
1015
|
+
cgroup_parent: String,
|
|
1016
|
+
console_size: T.nilable(T::Array[Integer]),
|
|
1017
|
+
container_id_file: String,
|
|
1018
|
+
cpu_count: Integer,
|
|
1019
|
+
cpu_percent: Integer,
|
|
1020
|
+
cpu_period: Integer,
|
|
1021
|
+
cpu_quota: Integer,
|
|
1022
|
+
cpu_realtime_period: Integer,
|
|
1023
|
+
cpu_realtime_runtime: Integer,
|
|
1024
|
+
cpuset_cpus: String,
|
|
1025
|
+
cpuset_mems: String,
|
|
1026
|
+
cpu_shares: Integer,
|
|
1027
|
+
device_cgroup_rules: T::Array[String],
|
|
1028
|
+
device_requests:
|
|
1029
|
+
T::Array[
|
|
1030
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::DeviceRequest::OrHash
|
|
1031
|
+
],
|
|
1032
|
+
devices:
|
|
1033
|
+
T::Array[
|
|
1034
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Device::OrHash
|
|
1035
|
+
],
|
|
1036
|
+
dns: T::Array[String],
|
|
1037
|
+
dns_options: T::Array[String],
|
|
1038
|
+
dns_search: T::Array[String],
|
|
1039
|
+
extra_hosts: T::Array[String],
|
|
1040
|
+
group_add: T::Array[String],
|
|
1041
|
+
init: T.nilable(T::Boolean),
|
|
1042
|
+
io_maximum_bandwidth: Integer,
|
|
1043
|
+
io_maximum_i_ops: Integer,
|
|
1044
|
+
ipc_mode: String,
|
|
1045
|
+
isolation:
|
|
1046
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::OrSymbol,
|
|
1047
|
+
links: T::Array[String],
|
|
1048
|
+
log_config:
|
|
1049
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::OrHash,
|
|
1050
|
+
masked_paths: T::Array[String],
|
|
1051
|
+
memory: Integer,
|
|
1052
|
+
memory_reservation: Integer,
|
|
1053
|
+
memory_swap: Integer,
|
|
1054
|
+
memory_swappiness: Integer,
|
|
1055
|
+
mounts:
|
|
1056
|
+
T::Array[
|
|
1057
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::OrHash
|
|
1058
|
+
],
|
|
1059
|
+
nano_cpus: Integer,
|
|
1060
|
+
network_mode: String,
|
|
1061
|
+
oom_kill_disable: T::Boolean,
|
|
1062
|
+
oom_score_adj: Integer,
|
|
1063
|
+
pid_mode: String,
|
|
1064
|
+
pids_limit: T.nilable(Integer),
|
|
1065
|
+
port_bindings:
|
|
1066
|
+
T::Hash[
|
|
1067
|
+
Symbol,
|
|
1068
|
+
T::Array[
|
|
1069
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::PortBinding::OrHash
|
|
1070
|
+
]
|
|
1071
|
+
],
|
|
1072
|
+
privileged: T::Boolean,
|
|
1073
|
+
publish_all_ports: T::Boolean,
|
|
1074
|
+
readonly_paths: T::Array[String],
|
|
1075
|
+
readonly_rootfs: T::Boolean,
|
|
1076
|
+
restart_policy:
|
|
1077
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::OrHash,
|
|
1078
|
+
runtime: T.nilable(String),
|
|
1079
|
+
security_opt: T::Array[String],
|
|
1080
|
+
shm_size: Integer,
|
|
1081
|
+
storage_opt: T::Hash[Symbol, String],
|
|
1082
|
+
sysctls: T.nilable(T::Hash[Symbol, String]),
|
|
1083
|
+
tmpfs: T::Hash[Symbol, String],
|
|
1084
|
+
ulimits:
|
|
1085
|
+
T::Array[
|
|
1086
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Ulimit::OrHash
|
|
1087
|
+
],
|
|
1088
|
+
userns_mode: String,
|
|
1089
|
+
uts_mode: String,
|
|
1090
|
+
volume_driver: String,
|
|
1091
|
+
volumes_from: T::Array[String]
|
|
1092
|
+
).returns(T.attached_class)
|
|
1093
|
+
end
|
|
1094
|
+
def self.new(
|
|
1095
|
+
# Arbitrary non-identifying metadata attached to container and provided to the
|
|
1096
|
+
# runtime when the container is started.
|
|
1097
|
+
annotations: nil,
|
|
1098
|
+
# Automatically remove the container when the container's process exits. This has
|
|
1099
|
+
# no effect if `RestartPolicy` is set.
|
|
1100
|
+
auto_remove: nil,
|
|
1101
|
+
# A list of volume bindings for this container. Each volume binding is a string in
|
|
1102
|
+
# one of these forms:
|
|
1103
|
+
#
|
|
1104
|
+
# - `host-src:container-dest[:options]` to bind-mount a host path into the
|
|
1105
|
+
# container. Both `host-src`, and `container-dest` must be an _absolute_ path.
|
|
1106
|
+
# - `volume-name:container-dest[:options]` to bind-mount a volume managed by a
|
|
1107
|
+
# volume driver into the container. `container-dest` must be an _absolute_ path.
|
|
1108
|
+
#
|
|
1109
|
+
# `options` is an optional, comma-delimited list of:
|
|
1110
|
+
#
|
|
1111
|
+
# - `nocopy` disables automatic copying of data from the container path to the
|
|
1112
|
+
# volume. The `nocopy` flag only applies to named volumes.
|
|
1113
|
+
# - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or
|
|
1114
|
+
# set to `rw`, volumes are mounted read-write.
|
|
1115
|
+
# - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read
|
|
1116
|
+
# and write to the same volume.
|
|
1117
|
+
# - `z`: a _shared_ content label is applied to the content. This label
|
|
1118
|
+
# indicates that multiple containers can share the volume content, for both
|
|
1119
|
+
# reading and writing.
|
|
1120
|
+
# - `Z`: a _private unshared_ label is applied to the content. This label
|
|
1121
|
+
# indicates that only the current container can use a private volume. Labeling
|
|
1122
|
+
# systems such as SELinux require proper labels to be placed on volume content
|
|
1123
|
+
# that is mounted into a container. Without a label, the security system can
|
|
1124
|
+
# prevent a container's processes from using the content. By default, the
|
|
1125
|
+
# labels set by the host operating system are not modified.
|
|
1126
|
+
# - `[[r]shared|[r]slave|[r]private]` specifies mount
|
|
1127
|
+
# [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
|
|
1128
|
+
# This only applies to bind-mounted volumes, not internal volumes or named
|
|
1129
|
+
# volumes. Mount propagation requires the source mount point (the location where
|
|
1130
|
+
# the source directory is mounted in the host operating system) to have the
|
|
1131
|
+
# correct propagation properties. For shared volumes, the source mount point
|
|
1132
|
+
# must be set to `shared`. For slave volumes, the mount must be set to either
|
|
1133
|
+
# `shared` or `slave`.
|
|
1134
|
+
binds: nil,
|
|
1135
|
+
# Limit read rate (bytes per second) from a device, in the form:
|
|
1136
|
+
#
|
|
1137
|
+
# ```
|
|
1138
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
1139
|
+
# ```
|
|
1140
|
+
blkio_device_read_bps: nil,
|
|
1141
|
+
# Limit read rate (IO per second) from a device, in the form:
|
|
1142
|
+
#
|
|
1143
|
+
# ```
|
|
1144
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
1145
|
+
# ```
|
|
1146
|
+
blkio_device_read_i_ops: nil,
|
|
1147
|
+
# Limit write rate (bytes per second) to a device, in the form:
|
|
1148
|
+
#
|
|
1149
|
+
# ```
|
|
1150
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
1151
|
+
# ```
|
|
1152
|
+
blkio_device_write_bps: nil,
|
|
1153
|
+
# Limit write rate (IO per second) to a device, in the form:
|
|
1154
|
+
#
|
|
1155
|
+
# ```
|
|
1156
|
+
# [{"Path": "device_path", "Rate": rate}]
|
|
1157
|
+
# ```
|
|
1158
|
+
blkio_device_write_i_ops: nil,
|
|
1159
|
+
# Block IO weight (relative weight).
|
|
1160
|
+
blkio_weight: nil,
|
|
1161
|
+
# Block IO weight (relative device weight) in the form:
|
|
1162
|
+
#
|
|
1163
|
+
# ```
|
|
1164
|
+
# [{"Path": "device_path", "Weight": weight}]
|
|
1165
|
+
# ```
|
|
1166
|
+
blkio_weight_device: nil,
|
|
1167
|
+
# A list of kernel capabilities to add to the container. Conflicts with option
|
|
1168
|
+
# 'Capabilities'.
|
|
1169
|
+
cap_add: nil,
|
|
1170
|
+
# A list of kernel capabilities to drop from the container. Conflicts with option
|
|
1171
|
+
# 'Capabilities'.
|
|
1172
|
+
cap_drop: nil,
|
|
1173
|
+
# Cgroup to use for the container.
|
|
1174
|
+
cgroup: nil,
|
|
1175
|
+
# cgroup namespace mode for the container. Possible values are:
|
|
1176
|
+
#
|
|
1177
|
+
# - `"private"`: the container runs in its own private cgroup namespace
|
|
1178
|
+
# - `"host"`: use the host system's cgroup namespace
|
|
1179
|
+
#
|
|
1180
|
+
# If not specified, the daemon default is used, which can either be `"private"` or
|
|
1181
|
+
# `"host"`, depending on daemon version, kernel support and configuration.
|
|
1182
|
+
cgroupns_mode: nil,
|
|
1183
|
+
# Path to `cgroups` under which the container's `cgroup` is created. If the path
|
|
1184
|
+
# is not absolute, the path is considered to be relative to the `cgroups` path of
|
|
1185
|
+
# the init process. Cgroups are created if they do not already exist.
|
|
1186
|
+
cgroup_parent: nil,
|
|
1187
|
+
# Initial console size, as an `[height, width]` array.
|
|
1188
|
+
console_size: nil,
|
|
1189
|
+
# Path to a file where the container ID is written
|
|
1190
|
+
container_id_file: nil,
|
|
1191
|
+
# The number of usable CPUs (Windows only).
|
|
1192
|
+
#
|
|
1193
|
+
# On Windows Server containers, the processor resource controls are mutually
|
|
1194
|
+
# exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
|
|
1195
|
+
# `CPUPercent` last.
|
|
1196
|
+
cpu_count: nil,
|
|
1197
|
+
# The usable percentage of the available CPUs (Windows only).
|
|
1198
|
+
#
|
|
1199
|
+
# On Windows Server containers, the processor resource controls are mutually
|
|
1200
|
+
# exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
|
|
1201
|
+
# `CPUPercent` last.
|
|
1202
|
+
cpu_percent: nil,
|
|
1203
|
+
# The length of a CPU period in microseconds.
|
|
1204
|
+
cpu_period: nil,
|
|
1205
|
+
# Microseconds of CPU time that the container can get in a CPU period.
|
|
1206
|
+
cpu_quota: nil,
|
|
1207
|
+
# The length of a CPU real-time period in microseconds. Set to 0 to allocate no
|
|
1208
|
+
# time allocated to real-time tasks.
|
|
1209
|
+
cpu_realtime_period: nil,
|
|
1210
|
+
# The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no
|
|
1211
|
+
# time allocated to real-time tasks.
|
|
1212
|
+
cpu_realtime_runtime: nil,
|
|
1213
|
+
# CPUs in which to allow execution (e.g., `0-3`, `0,1`).
|
|
1214
|
+
cpuset_cpus: nil,
|
|
1215
|
+
# Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
|
|
1216
|
+
# NUMA systems.
|
|
1217
|
+
cpuset_mems: nil,
|
|
1218
|
+
# An integer value representing this container's relative CPU weight versus other
|
|
1219
|
+
# containers.
|
|
1220
|
+
cpu_shares: nil,
|
|
1221
|
+
# a list of cgroup rules to apply to the container
|
|
1222
|
+
device_cgroup_rules: nil,
|
|
1223
|
+
# A list of requests for devices to be sent to device drivers.
|
|
1224
|
+
device_requests: nil,
|
|
1225
|
+
# A list of devices to add to the container.
|
|
1226
|
+
devices: nil,
|
|
1227
|
+
# A list of DNS servers for the container to use.
|
|
1228
|
+
dns: nil,
|
|
1229
|
+
# A list of DNS options.
|
|
1230
|
+
dns_options: nil,
|
|
1231
|
+
# A list of DNS search domains.
|
|
1232
|
+
dns_search: nil,
|
|
1233
|
+
# A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
|
|
1234
|
+
# Specified in the form `["hostname:IP"]`.
|
|
1235
|
+
extra_hosts: nil,
|
|
1236
|
+
# A list of additional groups that the container process will run as.
|
|
1237
|
+
group_add: nil,
|
|
1238
|
+
# Run an init inside the container that forwards signals and reaps processes. This
|
|
1239
|
+
# field is omitted if empty, and the default (as configured on the daemon) is
|
|
1240
|
+
# used.
|
|
1241
|
+
init: nil,
|
|
1242
|
+
# Maximum IO in bytes per second for the container system drive (Windows only).
|
|
1243
|
+
io_maximum_bandwidth: nil,
|
|
1244
|
+
# Maximum IOps for the container system drive (Windows only)
|
|
1245
|
+
io_maximum_i_ops: nil,
|
|
1246
|
+
# IPC sharing mode for the container. Possible values are:
|
|
1247
|
+
#
|
|
1248
|
+
# - `"none"`: own private IPC namespace, with /dev/shm not mounted
|
|
1249
|
+
# - `"private"`: own private IPC namespace
|
|
1250
|
+
# - `"shareable"`: own private IPC namespace, with a possibility to share it with
|
|
1251
|
+
# other containers
|
|
1252
|
+
# - `"container:<name|id>"`: join another (shareable) container's IPC namespace
|
|
1253
|
+
# - `"host"`: use the host system's IPC namespace
|
|
1254
|
+
#
|
|
1255
|
+
# If not specified, daemon default is used, which can either be `"private"` or
|
|
1256
|
+
# `"shareable"`, depending on daemon version and configuration.
|
|
1257
|
+
ipc_mode: nil,
|
|
1258
|
+
# Isolation technology of the container. (Windows only)
|
|
1259
|
+
isolation: nil,
|
|
1260
|
+
# A list of links for the container in the form `container_name:alias`.
|
|
1261
|
+
links: nil,
|
|
1262
|
+
# The logging configuration for this container
|
|
1263
|
+
log_config: nil,
|
|
1264
|
+
# The list of paths to be masked inside the container (this overrides the default
|
|
1265
|
+
# set of paths).
|
|
1266
|
+
masked_paths: nil,
|
|
1267
|
+
# Memory limit in bytes.
|
|
1268
|
+
memory: nil,
|
|
1269
|
+
# Memory soft limit in bytes.
|
|
1270
|
+
memory_reservation: nil,
|
|
1271
|
+
# Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.
|
|
1272
|
+
memory_swap: nil,
|
|
1273
|
+
# Tune a container's memory swappiness behavior. Accepts an integer between 0
|
|
1274
|
+
# and 100.
|
|
1275
|
+
memory_swappiness: nil,
|
|
1276
|
+
# Specification for mounts to be added to the container.
|
|
1277
|
+
mounts: nil,
|
|
1278
|
+
# CPU quota in units of 10<sup>-9</sup> CPUs.
|
|
1279
|
+
nano_cpus: nil,
|
|
1280
|
+
# Network mode to use for this container. Supported standard values are: `bridge`,
|
|
1281
|
+
# `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom
|
|
1282
|
+
# network's name to which this container should connect to.
|
|
1283
|
+
network_mode: nil,
|
|
1284
|
+
# Disable OOM Killer for the container.
|
|
1285
|
+
oom_kill_disable: nil,
|
|
1286
|
+
# An integer value containing the score given to the container in order to tune
|
|
1287
|
+
# OOM killer preferences.
|
|
1288
|
+
oom_score_adj: nil,
|
|
1289
|
+
# Set the PID (Process) Namespace mode for the container. It can be either:
|
|
1290
|
+
#
|
|
1291
|
+
# - `"container:<name|id>"`: joins another container's PID namespace
|
|
1292
|
+
# - `"host"`: use the host's PID namespace inside the container
|
|
1293
|
+
pid_mode: nil,
|
|
1294
|
+
# Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not
|
|
1295
|
+
# change.
|
|
1296
|
+
pids_limit: nil,
|
|
1297
|
+
# PortMap describes the mapping of container ports to host ports, using the
|
|
1298
|
+
# container's port-number and protocol as key in the format `<port>/<protocol>`,
|
|
1299
|
+
# for example, `80/udp`.
|
|
1300
|
+
#
|
|
1301
|
+
# If a container's port is mapped for multiple protocols, separate entries are
|
|
1302
|
+
# added to the mapping table.
|
|
1303
|
+
port_bindings: nil,
|
|
1304
|
+
# Gives the container full access to the host.
|
|
1305
|
+
privileged: nil,
|
|
1306
|
+
# Allocates an ephemeral host port for all of a container's exposed ports.
|
|
1307
|
+
#
|
|
1308
|
+
# Ports are de-allocated when the container stops and allocated when the container
|
|
1309
|
+
# starts. The allocated port might be changed when restarting the container.
|
|
1310
|
+
#
|
|
1311
|
+
# The port is selected from the ephemeral port range that depends on the kernel.
|
|
1312
|
+
# For example, on Linux the range is defined by
|
|
1313
|
+
# `/proc/sys/net/ipv4/ip_local_port_range`.
|
|
1314
|
+
publish_all_ports: nil,
|
|
1315
|
+
# The list of paths to be set as read-only inside the container (this overrides
|
|
1316
|
+
# the default set of paths).
|
|
1317
|
+
readonly_paths: nil,
|
|
1318
|
+
# Mount the container's root filesystem as read only.
|
|
1319
|
+
readonly_rootfs: nil,
|
|
1320
|
+
# The behavior to apply when the container exits. The default is not to restart.
|
|
1321
|
+
#
|
|
1322
|
+
# An ever increasing delay (double the previous delay, starting at 100ms) is added
|
|
1323
|
+
# before each restart to prevent flooding the server.
|
|
1324
|
+
restart_policy: nil,
|
|
1325
|
+
# Runtime to use with this container.
|
|
1326
|
+
runtime: nil,
|
|
1327
|
+
# A list of string values to customize labels for MLS systems, such as SELinux.
|
|
1328
|
+
security_opt: nil,
|
|
1329
|
+
# Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
|
|
1330
|
+
shm_size: nil,
|
|
1331
|
+
# Storage driver options for this container, in the form `{"size": "120G"}`.
|
|
1332
|
+
storage_opt: nil,
|
|
1333
|
+
# A list of kernel parameters (sysctls) to set in the container.
|
|
1334
|
+
#
|
|
1335
|
+
# This field is omitted if not set.
|
|
1336
|
+
sysctls: nil,
|
|
1337
|
+
# A map of container directories which should be replaced by tmpfs mounts, and
|
|
1338
|
+
# their corresponding mount options. For example:
|
|
1339
|
+
#
|
|
1340
|
+
# ```
|
|
1341
|
+
# { "/run": "rw,noexec,nosuid,size=65536k" }
|
|
1342
|
+
# ```
|
|
1343
|
+
tmpfs: nil,
|
|
1344
|
+
# A list of resource limits to set in the container. For example:
|
|
1345
|
+
#
|
|
1346
|
+
# ```
|
|
1347
|
+
# {"Name": "nofile", "Soft": 1024, "Hard": 2048}
|
|
1348
|
+
# ```
|
|
1349
|
+
ulimits: nil,
|
|
1350
|
+
# Sets the usernamespace mode for the container when usernamespace remapping
|
|
1351
|
+
# option is enabled.
|
|
1352
|
+
userns_mode: nil,
|
|
1353
|
+
# UTS namespace to use for the container.
|
|
1354
|
+
uts_mode: nil,
|
|
1355
|
+
# Driver that this container uses to mount volumes.
|
|
1356
|
+
volume_driver: nil,
|
|
1357
|
+
# A list of volumes to inherit from another container, specified in the form
|
|
1358
|
+
# `<container name>[:<ro|rw>]`.
|
|
1359
|
+
volumes_from: nil
|
|
1360
|
+
)
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
sig do
|
|
1364
|
+
override.returns(
|
|
1365
|
+
{
|
|
1366
|
+
annotations: T::Hash[Symbol, String],
|
|
1367
|
+
auto_remove: T::Boolean,
|
|
1368
|
+
binds: T::Array[String],
|
|
1369
|
+
blkio_device_read_bps:
|
|
1370
|
+
T::Array[
|
|
1371
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp
|
|
1372
|
+
],
|
|
1373
|
+
blkio_device_read_i_ops:
|
|
1374
|
+
T::Array[
|
|
1375
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp
|
|
1376
|
+
],
|
|
1377
|
+
blkio_device_write_bps:
|
|
1378
|
+
T::Array[
|
|
1379
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp
|
|
1380
|
+
],
|
|
1381
|
+
blkio_device_write_i_ops:
|
|
1382
|
+
T::Array[
|
|
1383
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp
|
|
1384
|
+
],
|
|
1385
|
+
blkio_weight: Integer,
|
|
1386
|
+
blkio_weight_device:
|
|
1387
|
+
T::Array[
|
|
1388
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice
|
|
1389
|
+
],
|
|
1390
|
+
cap_add: T::Array[String],
|
|
1391
|
+
cap_drop: T::Array[String],
|
|
1392
|
+
cgroup: String,
|
|
1393
|
+
cgroupns_mode:
|
|
1394
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::OrSymbol,
|
|
1395
|
+
cgroup_parent: String,
|
|
1396
|
+
console_size: T.nilable(T::Array[Integer]),
|
|
1397
|
+
container_id_file: String,
|
|
1398
|
+
cpu_count: Integer,
|
|
1399
|
+
cpu_percent: Integer,
|
|
1400
|
+
cpu_period: Integer,
|
|
1401
|
+
cpu_quota: Integer,
|
|
1402
|
+
cpu_realtime_period: Integer,
|
|
1403
|
+
cpu_realtime_runtime: Integer,
|
|
1404
|
+
cpuset_cpus: String,
|
|
1405
|
+
cpuset_mems: String,
|
|
1406
|
+
cpu_shares: Integer,
|
|
1407
|
+
device_cgroup_rules: T::Array[String],
|
|
1408
|
+
device_requests:
|
|
1409
|
+
T::Array[
|
|
1410
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::DeviceRequest
|
|
1411
|
+
],
|
|
1412
|
+
devices:
|
|
1413
|
+
T::Array[
|
|
1414
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Device
|
|
1415
|
+
],
|
|
1416
|
+
dns: T::Array[String],
|
|
1417
|
+
dns_options: T::Array[String],
|
|
1418
|
+
dns_search: T::Array[String],
|
|
1419
|
+
extra_hosts: T::Array[String],
|
|
1420
|
+
group_add: T::Array[String],
|
|
1421
|
+
init: T.nilable(T::Boolean),
|
|
1422
|
+
io_maximum_bandwidth: Integer,
|
|
1423
|
+
io_maximum_i_ops: Integer,
|
|
1424
|
+
ipc_mode: String,
|
|
1425
|
+
isolation:
|
|
1426
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::OrSymbol,
|
|
1427
|
+
links: T::Array[String],
|
|
1428
|
+
log_config:
|
|
1429
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig,
|
|
1430
|
+
masked_paths: T::Array[String],
|
|
1431
|
+
memory: Integer,
|
|
1432
|
+
memory_reservation: Integer,
|
|
1433
|
+
memory_swap: Integer,
|
|
1434
|
+
memory_swappiness: Integer,
|
|
1435
|
+
mounts:
|
|
1436
|
+
T::Array[
|
|
1437
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount
|
|
1438
|
+
],
|
|
1439
|
+
nano_cpus: Integer,
|
|
1440
|
+
network_mode: String,
|
|
1441
|
+
oom_kill_disable: T::Boolean,
|
|
1442
|
+
oom_score_adj: Integer,
|
|
1443
|
+
pid_mode: String,
|
|
1444
|
+
pids_limit: T.nilable(Integer),
|
|
1445
|
+
port_bindings:
|
|
1446
|
+
T::Hash[
|
|
1447
|
+
Symbol,
|
|
1448
|
+
T::Array[
|
|
1449
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::PortBinding
|
|
1450
|
+
]
|
|
1451
|
+
],
|
|
1452
|
+
privileged: T::Boolean,
|
|
1453
|
+
publish_all_ports: T::Boolean,
|
|
1454
|
+
readonly_paths: T::Array[String],
|
|
1455
|
+
readonly_rootfs: T::Boolean,
|
|
1456
|
+
restart_policy:
|
|
1457
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy,
|
|
1458
|
+
runtime: T.nilable(String),
|
|
1459
|
+
security_opt: T::Array[String],
|
|
1460
|
+
shm_size: Integer,
|
|
1461
|
+
storage_opt: T::Hash[Symbol, String],
|
|
1462
|
+
sysctls: T.nilable(T::Hash[Symbol, String]),
|
|
1463
|
+
tmpfs: T::Hash[Symbol, String],
|
|
1464
|
+
ulimits:
|
|
1465
|
+
T::Array[
|
|
1466
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Ulimit
|
|
1467
|
+
],
|
|
1468
|
+
userns_mode: String,
|
|
1469
|
+
uts_mode: String,
|
|
1470
|
+
volume_driver: String,
|
|
1471
|
+
volumes_from: T::Array[String]
|
|
1472
|
+
}
|
|
1473
|
+
)
|
|
1474
|
+
end
|
|
1475
|
+
def to_hash
|
|
1476
|
+
end
|
|
1477
|
+
|
|
1478
|
+
class BlkioDeviceReadBp < DockerEngine::Internal::Type::BaseModel
|
|
1479
|
+
OrHash =
|
|
1480
|
+
T.type_alias do
|
|
1481
|
+
T.any(
|
|
1482
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp,
|
|
1483
|
+
DockerEngine::Internal::AnyHash
|
|
1484
|
+
)
|
|
1485
|
+
end
|
|
1486
|
+
|
|
1487
|
+
# Device path
|
|
1488
|
+
sig { returns(T.nilable(String)) }
|
|
1489
|
+
attr_reader :path
|
|
1490
|
+
|
|
1491
|
+
sig { params(path: String).void }
|
|
1492
|
+
attr_writer :path
|
|
1493
|
+
|
|
1494
|
+
# Rate
|
|
1495
|
+
sig { returns(T.nilable(Integer)) }
|
|
1496
|
+
attr_reader :rate
|
|
1497
|
+
|
|
1498
|
+
sig { params(rate: Integer).void }
|
|
1499
|
+
attr_writer :rate
|
|
1500
|
+
|
|
1501
|
+
sig do
|
|
1502
|
+
params(path: String, rate: Integer).returns(T.attached_class)
|
|
1503
|
+
end
|
|
1504
|
+
def self.new(
|
|
1505
|
+
# Device path
|
|
1506
|
+
path: nil,
|
|
1507
|
+
# Rate
|
|
1508
|
+
rate: nil
|
|
1509
|
+
)
|
|
1510
|
+
end
|
|
1511
|
+
|
|
1512
|
+
sig { override.returns({ path: String, rate: Integer }) }
|
|
1513
|
+
def to_hash
|
|
1514
|
+
end
|
|
1515
|
+
end
|
|
1516
|
+
|
|
1517
|
+
class BlkioDeviceReadIOp < DockerEngine::Internal::Type::BaseModel
|
|
1518
|
+
OrHash =
|
|
1519
|
+
T.type_alias do
|
|
1520
|
+
T.any(
|
|
1521
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp,
|
|
1522
|
+
DockerEngine::Internal::AnyHash
|
|
1523
|
+
)
|
|
1524
|
+
end
|
|
1525
|
+
|
|
1526
|
+
# Device path
|
|
1527
|
+
sig { returns(T.nilable(String)) }
|
|
1528
|
+
attr_reader :path
|
|
1529
|
+
|
|
1530
|
+
sig { params(path: String).void }
|
|
1531
|
+
attr_writer :path
|
|
1532
|
+
|
|
1533
|
+
# Rate
|
|
1534
|
+
sig { returns(T.nilable(Integer)) }
|
|
1535
|
+
attr_reader :rate
|
|
1536
|
+
|
|
1537
|
+
sig { params(rate: Integer).void }
|
|
1538
|
+
attr_writer :rate
|
|
1539
|
+
|
|
1540
|
+
sig do
|
|
1541
|
+
params(path: String, rate: Integer).returns(T.attached_class)
|
|
1542
|
+
end
|
|
1543
|
+
def self.new(
|
|
1544
|
+
# Device path
|
|
1545
|
+
path: nil,
|
|
1546
|
+
# Rate
|
|
1547
|
+
rate: nil
|
|
1548
|
+
)
|
|
1549
|
+
end
|
|
1550
|
+
|
|
1551
|
+
sig { override.returns({ path: String, rate: Integer }) }
|
|
1552
|
+
def to_hash
|
|
1553
|
+
end
|
|
1554
|
+
end
|
|
1555
|
+
|
|
1556
|
+
class BlkioDeviceWriteBp < DockerEngine::Internal::Type::BaseModel
|
|
1557
|
+
OrHash =
|
|
1558
|
+
T.type_alias do
|
|
1559
|
+
T.any(
|
|
1560
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp,
|
|
1561
|
+
DockerEngine::Internal::AnyHash
|
|
1562
|
+
)
|
|
1563
|
+
end
|
|
1564
|
+
|
|
1565
|
+
# Device path
|
|
1566
|
+
sig { returns(T.nilable(String)) }
|
|
1567
|
+
attr_reader :path
|
|
1568
|
+
|
|
1569
|
+
sig { params(path: String).void }
|
|
1570
|
+
attr_writer :path
|
|
1571
|
+
|
|
1572
|
+
# Rate
|
|
1573
|
+
sig { returns(T.nilable(Integer)) }
|
|
1574
|
+
attr_reader :rate
|
|
1575
|
+
|
|
1576
|
+
sig { params(rate: Integer).void }
|
|
1577
|
+
attr_writer :rate
|
|
1578
|
+
|
|
1579
|
+
sig do
|
|
1580
|
+
params(path: String, rate: Integer).returns(T.attached_class)
|
|
1581
|
+
end
|
|
1582
|
+
def self.new(
|
|
1583
|
+
# Device path
|
|
1584
|
+
path: nil,
|
|
1585
|
+
# Rate
|
|
1586
|
+
rate: nil
|
|
1587
|
+
)
|
|
1588
|
+
end
|
|
1589
|
+
|
|
1590
|
+
sig { override.returns({ path: String, rate: Integer }) }
|
|
1591
|
+
def to_hash
|
|
1592
|
+
end
|
|
1593
|
+
end
|
|
1594
|
+
|
|
1595
|
+
class BlkioDeviceWriteIOp < DockerEngine::Internal::Type::BaseModel
|
|
1596
|
+
OrHash =
|
|
1597
|
+
T.type_alias do
|
|
1598
|
+
T.any(
|
|
1599
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp,
|
|
1600
|
+
DockerEngine::Internal::AnyHash
|
|
1601
|
+
)
|
|
1602
|
+
end
|
|
1603
|
+
|
|
1604
|
+
# Device path
|
|
1605
|
+
sig { returns(T.nilable(String)) }
|
|
1606
|
+
attr_reader :path
|
|
1607
|
+
|
|
1608
|
+
sig { params(path: String).void }
|
|
1609
|
+
attr_writer :path
|
|
1610
|
+
|
|
1611
|
+
# Rate
|
|
1612
|
+
sig { returns(T.nilable(Integer)) }
|
|
1613
|
+
attr_reader :rate
|
|
1614
|
+
|
|
1615
|
+
sig { params(rate: Integer).void }
|
|
1616
|
+
attr_writer :rate
|
|
1617
|
+
|
|
1618
|
+
sig do
|
|
1619
|
+
params(path: String, rate: Integer).returns(T.attached_class)
|
|
1620
|
+
end
|
|
1621
|
+
def self.new(
|
|
1622
|
+
# Device path
|
|
1623
|
+
path: nil,
|
|
1624
|
+
# Rate
|
|
1625
|
+
rate: nil
|
|
1626
|
+
)
|
|
1627
|
+
end
|
|
1628
|
+
|
|
1629
|
+
sig { override.returns({ path: String, rate: Integer }) }
|
|
1630
|
+
def to_hash
|
|
1631
|
+
end
|
|
1632
|
+
end
|
|
1633
|
+
|
|
1634
|
+
class BlkioWeightDevice < DockerEngine::Internal::Type::BaseModel
|
|
1635
|
+
OrHash =
|
|
1636
|
+
T.type_alias do
|
|
1637
|
+
T.any(
|
|
1638
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice,
|
|
1639
|
+
DockerEngine::Internal::AnyHash
|
|
1640
|
+
)
|
|
1641
|
+
end
|
|
1642
|
+
|
|
1643
|
+
sig { returns(T.nilable(String)) }
|
|
1644
|
+
attr_reader :path
|
|
1645
|
+
|
|
1646
|
+
sig { params(path: String).void }
|
|
1647
|
+
attr_writer :path
|
|
1648
|
+
|
|
1649
|
+
sig { returns(T.nilable(Integer)) }
|
|
1650
|
+
attr_reader :weight
|
|
1651
|
+
|
|
1652
|
+
sig { params(weight: Integer).void }
|
|
1653
|
+
attr_writer :weight
|
|
1654
|
+
|
|
1655
|
+
sig do
|
|
1656
|
+
params(path: String, weight: Integer).returns(T.attached_class)
|
|
1657
|
+
end
|
|
1658
|
+
def self.new(path: nil, weight: nil)
|
|
1659
|
+
end
|
|
1660
|
+
|
|
1661
|
+
sig { override.returns({ path: String, weight: Integer }) }
|
|
1662
|
+
def to_hash
|
|
1663
|
+
end
|
|
1664
|
+
end
|
|
1665
|
+
|
|
1666
|
+
# cgroup namespace mode for the container. Possible values are:
|
|
1667
|
+
#
|
|
1668
|
+
# - `"private"`: the container runs in its own private cgroup namespace
|
|
1669
|
+
# - `"host"`: use the host system's cgroup namespace
|
|
1670
|
+
#
|
|
1671
|
+
# If not specified, the daemon default is used, which can either be `"private"` or
|
|
1672
|
+
# `"host"`, depending on daemon version, kernel support and configuration.
|
|
1673
|
+
module CgroupnsMode
|
|
1674
|
+
extend DockerEngine::Internal::Type::Enum
|
|
1675
|
+
|
|
1676
|
+
TaggedSymbol =
|
|
1677
|
+
T.type_alias do
|
|
1678
|
+
T.all(
|
|
1679
|
+
Symbol,
|
|
1680
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode
|
|
1681
|
+
)
|
|
1682
|
+
end
|
|
1683
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1684
|
+
|
|
1685
|
+
PRIVATE =
|
|
1686
|
+
T.let(
|
|
1687
|
+
:private,
|
|
1688
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::TaggedSymbol
|
|
1689
|
+
)
|
|
1690
|
+
HOST =
|
|
1691
|
+
T.let(
|
|
1692
|
+
:host,
|
|
1693
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::TaggedSymbol
|
|
1694
|
+
)
|
|
1695
|
+
|
|
1696
|
+
sig do
|
|
1697
|
+
override.returns(
|
|
1698
|
+
T::Array[
|
|
1699
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::CgroupnsMode::TaggedSymbol
|
|
1700
|
+
]
|
|
1701
|
+
)
|
|
1702
|
+
end
|
|
1703
|
+
def self.values
|
|
1704
|
+
end
|
|
1705
|
+
end
|
|
1706
|
+
|
|
1707
|
+
class DeviceRequest < DockerEngine::Internal::Type::BaseModel
|
|
1708
|
+
OrHash =
|
|
1709
|
+
T.type_alias do
|
|
1710
|
+
T.any(
|
|
1711
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::DeviceRequest,
|
|
1712
|
+
DockerEngine::Internal::AnyHash
|
|
1713
|
+
)
|
|
1714
|
+
end
|
|
1715
|
+
|
|
1716
|
+
# A list of capabilities; an OR list of AND lists of capabilities.
|
|
1717
|
+
#
|
|
1718
|
+
# Note that if a driver is specified the capabilities have no effect on selecting
|
|
1719
|
+
# a driver as the driver name is used directly.
|
|
1720
|
+
#
|
|
1721
|
+
# Note that if no driver is specified the capabilities are used to select a driver
|
|
1722
|
+
# with the required capabilities.
|
|
1723
|
+
sig { returns(T.nilable(T::Array[T::Array[String]])) }
|
|
1724
|
+
attr_reader :capabilities
|
|
1725
|
+
|
|
1726
|
+
sig { params(capabilities: T::Array[T::Array[String]]).void }
|
|
1727
|
+
attr_writer :capabilities
|
|
1728
|
+
|
|
1729
|
+
sig { returns(T.nilable(Integer)) }
|
|
1730
|
+
attr_reader :count
|
|
1731
|
+
|
|
1732
|
+
sig { params(count: Integer).void }
|
|
1733
|
+
attr_writer :count
|
|
1734
|
+
|
|
1735
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1736
|
+
attr_reader :device_ids
|
|
1737
|
+
|
|
1738
|
+
sig { params(device_ids: T::Array[String]).void }
|
|
1739
|
+
attr_writer :device_ids
|
|
1740
|
+
|
|
1741
|
+
# The name of the device driver to use for this request.
|
|
1742
|
+
#
|
|
1743
|
+
# Note that if this is specified the capabilities are ignored when selecting a
|
|
1744
|
+
# device driver.
|
|
1745
|
+
sig { returns(T.nilable(String)) }
|
|
1746
|
+
attr_reader :driver
|
|
1747
|
+
|
|
1748
|
+
sig { params(driver: String).void }
|
|
1749
|
+
attr_writer :driver
|
|
1750
|
+
|
|
1751
|
+
# Driver-specific options, specified as a key/value pairs. These options are
|
|
1752
|
+
# passed directly to the driver.
|
|
1753
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
1754
|
+
attr_reader :options
|
|
1755
|
+
|
|
1756
|
+
sig { params(options: T::Hash[Symbol, String]).void }
|
|
1757
|
+
attr_writer :options
|
|
1758
|
+
|
|
1759
|
+
# A request for devices to be sent to device drivers
|
|
1760
|
+
sig do
|
|
1761
|
+
params(
|
|
1762
|
+
capabilities: T::Array[T::Array[String]],
|
|
1763
|
+
count: Integer,
|
|
1764
|
+
device_ids: T::Array[String],
|
|
1765
|
+
driver: String,
|
|
1766
|
+
options: T::Hash[Symbol, String]
|
|
1767
|
+
).returns(T.attached_class)
|
|
1768
|
+
end
|
|
1769
|
+
def self.new(
|
|
1770
|
+
# A list of capabilities; an OR list of AND lists of capabilities.
|
|
1771
|
+
#
|
|
1772
|
+
# Note that if a driver is specified the capabilities have no effect on selecting
|
|
1773
|
+
# a driver as the driver name is used directly.
|
|
1774
|
+
#
|
|
1775
|
+
# Note that if no driver is specified the capabilities are used to select a driver
|
|
1776
|
+
# with the required capabilities.
|
|
1777
|
+
capabilities: nil,
|
|
1778
|
+
count: nil,
|
|
1779
|
+
device_ids: nil,
|
|
1780
|
+
# The name of the device driver to use for this request.
|
|
1781
|
+
#
|
|
1782
|
+
# Note that if this is specified the capabilities are ignored when selecting a
|
|
1783
|
+
# device driver.
|
|
1784
|
+
driver: nil,
|
|
1785
|
+
# Driver-specific options, specified as a key/value pairs. These options are
|
|
1786
|
+
# passed directly to the driver.
|
|
1787
|
+
options: nil
|
|
1788
|
+
)
|
|
1789
|
+
end
|
|
1790
|
+
|
|
1791
|
+
sig do
|
|
1792
|
+
override.returns(
|
|
1793
|
+
{
|
|
1794
|
+
capabilities: T::Array[T::Array[String]],
|
|
1795
|
+
count: Integer,
|
|
1796
|
+
device_ids: T::Array[String],
|
|
1797
|
+
driver: String,
|
|
1798
|
+
options: T::Hash[Symbol, String]
|
|
1799
|
+
}
|
|
1800
|
+
)
|
|
1801
|
+
end
|
|
1802
|
+
def to_hash
|
|
1803
|
+
end
|
|
1804
|
+
end
|
|
1805
|
+
|
|
1806
|
+
class Device < DockerEngine::Internal::Type::BaseModel
|
|
1807
|
+
OrHash =
|
|
1808
|
+
T.type_alias do
|
|
1809
|
+
T.any(
|
|
1810
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Device,
|
|
1811
|
+
DockerEngine::Internal::AnyHash
|
|
1812
|
+
)
|
|
1813
|
+
end
|
|
1814
|
+
|
|
1815
|
+
sig { returns(T.nilable(String)) }
|
|
1816
|
+
attr_reader :cgroup_permissions
|
|
1817
|
+
|
|
1818
|
+
sig { params(cgroup_permissions: String).void }
|
|
1819
|
+
attr_writer :cgroup_permissions
|
|
1820
|
+
|
|
1821
|
+
sig { returns(T.nilable(String)) }
|
|
1822
|
+
attr_reader :path_in_container
|
|
1823
|
+
|
|
1824
|
+
sig { params(path_in_container: String).void }
|
|
1825
|
+
attr_writer :path_in_container
|
|
1826
|
+
|
|
1827
|
+
sig { returns(T.nilable(String)) }
|
|
1828
|
+
attr_reader :path_on_host
|
|
1829
|
+
|
|
1830
|
+
sig { params(path_on_host: String).void }
|
|
1831
|
+
attr_writer :path_on_host
|
|
1832
|
+
|
|
1833
|
+
# A device mapping between the host and container
|
|
1834
|
+
sig do
|
|
1835
|
+
params(
|
|
1836
|
+
cgroup_permissions: String,
|
|
1837
|
+
path_in_container: String,
|
|
1838
|
+
path_on_host: String
|
|
1839
|
+
).returns(T.attached_class)
|
|
1840
|
+
end
|
|
1841
|
+
def self.new(
|
|
1842
|
+
cgroup_permissions: nil,
|
|
1843
|
+
path_in_container: nil,
|
|
1844
|
+
path_on_host: nil
|
|
1845
|
+
)
|
|
1846
|
+
end
|
|
1847
|
+
|
|
1848
|
+
sig do
|
|
1849
|
+
override.returns(
|
|
1850
|
+
{
|
|
1851
|
+
cgroup_permissions: String,
|
|
1852
|
+
path_in_container: String,
|
|
1853
|
+
path_on_host: String
|
|
1854
|
+
}
|
|
1855
|
+
)
|
|
1856
|
+
end
|
|
1857
|
+
def to_hash
|
|
1858
|
+
end
|
|
1859
|
+
end
|
|
1860
|
+
|
|
1861
|
+
# Isolation technology of the container. (Windows only)
|
|
1862
|
+
module Isolation
|
|
1863
|
+
extend DockerEngine::Internal::Type::Enum
|
|
1864
|
+
|
|
1865
|
+
TaggedSymbol =
|
|
1866
|
+
T.type_alias do
|
|
1867
|
+
T.all(
|
|
1868
|
+
Symbol,
|
|
1869
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation
|
|
1870
|
+
)
|
|
1871
|
+
end
|
|
1872
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1873
|
+
|
|
1874
|
+
DEFAULT =
|
|
1875
|
+
T.let(
|
|
1876
|
+
:default,
|
|
1877
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::TaggedSymbol
|
|
1878
|
+
)
|
|
1879
|
+
PROCESS =
|
|
1880
|
+
T.let(
|
|
1881
|
+
:process,
|
|
1882
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::TaggedSymbol
|
|
1883
|
+
)
|
|
1884
|
+
HYPERV =
|
|
1885
|
+
T.let(
|
|
1886
|
+
:hyperv,
|
|
1887
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::TaggedSymbol
|
|
1888
|
+
)
|
|
1889
|
+
EMPTY =
|
|
1890
|
+
T.let(
|
|
1891
|
+
:"",
|
|
1892
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::TaggedSymbol
|
|
1893
|
+
)
|
|
1894
|
+
|
|
1895
|
+
sig do
|
|
1896
|
+
override.returns(
|
|
1897
|
+
T::Array[
|
|
1898
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Isolation::TaggedSymbol
|
|
1899
|
+
]
|
|
1900
|
+
)
|
|
1901
|
+
end
|
|
1902
|
+
def self.values
|
|
1903
|
+
end
|
|
1904
|
+
end
|
|
1905
|
+
|
|
1906
|
+
class LogConfig < DockerEngine::Internal::Type::BaseModel
|
|
1907
|
+
OrHash =
|
|
1908
|
+
T.type_alias do
|
|
1909
|
+
T.any(
|
|
1910
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig,
|
|
1911
|
+
DockerEngine::Internal::AnyHash
|
|
1912
|
+
)
|
|
1913
|
+
end
|
|
1914
|
+
|
|
1915
|
+
# Driver-specific configuration options for the logging driver.
|
|
1916
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
1917
|
+
attr_reader :config
|
|
1918
|
+
|
|
1919
|
+
sig { params(config: T::Hash[Symbol, String]).void }
|
|
1920
|
+
attr_writer :config
|
|
1921
|
+
|
|
1922
|
+
# Name of the logging driver used for the container or "none" if logging is
|
|
1923
|
+
# disabled.
|
|
1924
|
+
sig do
|
|
1925
|
+
returns(
|
|
1926
|
+
T.nilable(
|
|
1927
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::OrSymbol
|
|
1928
|
+
)
|
|
1929
|
+
)
|
|
1930
|
+
end
|
|
1931
|
+
attr_reader :type
|
|
1932
|
+
|
|
1933
|
+
sig do
|
|
1934
|
+
params(
|
|
1935
|
+
type:
|
|
1936
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::OrSymbol
|
|
1937
|
+
).void
|
|
1938
|
+
end
|
|
1939
|
+
attr_writer :type
|
|
1940
|
+
|
|
1941
|
+
# The logging configuration for this container
|
|
1942
|
+
sig do
|
|
1943
|
+
params(
|
|
1944
|
+
config: T::Hash[Symbol, String],
|
|
1945
|
+
type:
|
|
1946
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::OrSymbol
|
|
1947
|
+
).returns(T.attached_class)
|
|
1948
|
+
end
|
|
1949
|
+
def self.new(
|
|
1950
|
+
# Driver-specific configuration options for the logging driver.
|
|
1951
|
+
config: nil,
|
|
1952
|
+
# Name of the logging driver used for the container or "none" if logging is
|
|
1953
|
+
# disabled.
|
|
1954
|
+
type: nil
|
|
1955
|
+
)
|
|
1956
|
+
end
|
|
1957
|
+
|
|
1958
|
+
sig do
|
|
1959
|
+
override.returns(
|
|
1960
|
+
{
|
|
1961
|
+
config: T::Hash[Symbol, String],
|
|
1962
|
+
type:
|
|
1963
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::OrSymbol
|
|
1964
|
+
}
|
|
1965
|
+
)
|
|
1966
|
+
end
|
|
1967
|
+
def to_hash
|
|
1968
|
+
end
|
|
1969
|
+
|
|
1970
|
+
# Name of the logging driver used for the container or "none" if logging is
|
|
1971
|
+
# disabled.
|
|
1972
|
+
module Type
|
|
1973
|
+
extend DockerEngine::Internal::Type::Enum
|
|
1974
|
+
|
|
1975
|
+
TaggedSymbol =
|
|
1976
|
+
T.type_alias do
|
|
1977
|
+
T.all(
|
|
1978
|
+
Symbol,
|
|
1979
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type
|
|
1980
|
+
)
|
|
1981
|
+
end
|
|
1982
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1983
|
+
|
|
1984
|
+
LOCAL =
|
|
1985
|
+
T.let(
|
|
1986
|
+
:local,
|
|
1987
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
1988
|
+
)
|
|
1989
|
+
JSON_FILE =
|
|
1990
|
+
T.let(
|
|
1991
|
+
:"json-file",
|
|
1992
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
1993
|
+
)
|
|
1994
|
+
SYSLOG =
|
|
1995
|
+
T.let(
|
|
1996
|
+
:syslog,
|
|
1997
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
1998
|
+
)
|
|
1999
|
+
JOURNALD =
|
|
2000
|
+
T.let(
|
|
2001
|
+
:journald,
|
|
2002
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2003
|
+
)
|
|
2004
|
+
GELF =
|
|
2005
|
+
T.let(
|
|
2006
|
+
:gelf,
|
|
2007
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2008
|
+
)
|
|
2009
|
+
FLUENTD =
|
|
2010
|
+
T.let(
|
|
2011
|
+
:fluentd,
|
|
2012
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2013
|
+
)
|
|
2014
|
+
AWSLOGS =
|
|
2015
|
+
T.let(
|
|
2016
|
+
:awslogs,
|
|
2017
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2018
|
+
)
|
|
2019
|
+
SPLUNK =
|
|
2020
|
+
T.let(
|
|
2021
|
+
:splunk,
|
|
2022
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2023
|
+
)
|
|
2024
|
+
ETWLOGS =
|
|
2025
|
+
T.let(
|
|
2026
|
+
:etwlogs,
|
|
2027
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2028
|
+
)
|
|
2029
|
+
NONE =
|
|
2030
|
+
T.let(
|
|
2031
|
+
:none,
|
|
2032
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2033
|
+
)
|
|
2034
|
+
|
|
2035
|
+
sig do
|
|
2036
|
+
override.returns(
|
|
2037
|
+
T::Array[
|
|
2038
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::LogConfig::Type::TaggedSymbol
|
|
2039
|
+
]
|
|
2040
|
+
)
|
|
2041
|
+
end
|
|
2042
|
+
def self.values
|
|
2043
|
+
end
|
|
2044
|
+
end
|
|
2045
|
+
end
|
|
2046
|
+
|
|
2047
|
+
class Mount < DockerEngine::Internal::Type::BaseModel
|
|
2048
|
+
OrHash =
|
|
2049
|
+
T.type_alias do
|
|
2050
|
+
T.any(
|
|
2051
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount,
|
|
2052
|
+
DockerEngine::Internal::AnyHash
|
|
2053
|
+
)
|
|
2054
|
+
end
|
|
2055
|
+
|
|
2056
|
+
# Optional configuration for the `bind` type.
|
|
2057
|
+
sig do
|
|
2058
|
+
returns(
|
|
2059
|
+
T.nilable(
|
|
2060
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions
|
|
2061
|
+
)
|
|
2062
|
+
)
|
|
2063
|
+
end
|
|
2064
|
+
attr_reader :bind_options
|
|
2065
|
+
|
|
2066
|
+
sig do
|
|
2067
|
+
params(
|
|
2068
|
+
bind_options:
|
|
2069
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::OrHash
|
|
2070
|
+
).void
|
|
2071
|
+
end
|
|
2072
|
+
attr_writer :bind_options
|
|
2073
|
+
|
|
2074
|
+
# The consistency requirement for the mount: `default`, `consistent`, `cached`, or
|
|
2075
|
+
# `delegated`.
|
|
2076
|
+
sig { returns(T.nilable(String)) }
|
|
2077
|
+
attr_reader :consistency
|
|
2078
|
+
|
|
2079
|
+
sig { params(consistency: String).void }
|
|
2080
|
+
attr_writer :consistency
|
|
2081
|
+
|
|
2082
|
+
# Optional configuration for the `image` type.
|
|
2083
|
+
sig do
|
|
2084
|
+
returns(
|
|
2085
|
+
T.nilable(
|
|
2086
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions
|
|
2087
|
+
)
|
|
2088
|
+
)
|
|
2089
|
+
end
|
|
2090
|
+
attr_reader :image_options
|
|
2091
|
+
|
|
2092
|
+
sig do
|
|
2093
|
+
params(
|
|
2094
|
+
image_options:
|
|
2095
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions::OrHash
|
|
2096
|
+
).void
|
|
2097
|
+
end
|
|
2098
|
+
attr_writer :image_options
|
|
2099
|
+
|
|
2100
|
+
# Whether the mount should be read-only.
|
|
2101
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2102
|
+
attr_reader :read_only
|
|
2103
|
+
|
|
2104
|
+
sig { params(read_only: T::Boolean).void }
|
|
2105
|
+
attr_writer :read_only
|
|
2106
|
+
|
|
2107
|
+
# Mount source (e.g. a volume name, a host path). The source cannot be specified
|
|
2108
|
+
# when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
|
|
2109
|
+
# the `CreateMountpoint` must be set to `true` to create the source path on the
|
|
2110
|
+
# host if missing.
|
|
2111
|
+
#
|
|
2112
|
+
# For `Type=npipe`, the pipe must exist prior to creating the container.
|
|
2113
|
+
sig { returns(T.nilable(String)) }
|
|
2114
|
+
attr_reader :source
|
|
2115
|
+
|
|
2116
|
+
sig { params(source: String).void }
|
|
2117
|
+
attr_writer :source
|
|
2118
|
+
|
|
2119
|
+
# Container path.
|
|
2120
|
+
sig { returns(T.nilable(String)) }
|
|
2121
|
+
attr_reader :target
|
|
2122
|
+
|
|
2123
|
+
sig { params(target: String).void }
|
|
2124
|
+
attr_writer :target
|
|
2125
|
+
|
|
2126
|
+
# Optional configuration for the `tmpfs` type.
|
|
2127
|
+
sig do
|
|
2128
|
+
returns(
|
|
2129
|
+
T.nilable(
|
|
2130
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions
|
|
2131
|
+
)
|
|
2132
|
+
)
|
|
2133
|
+
end
|
|
2134
|
+
attr_reader :tmpfs_options
|
|
2135
|
+
|
|
2136
|
+
sig do
|
|
2137
|
+
params(
|
|
2138
|
+
tmpfs_options:
|
|
2139
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions::OrHash
|
|
2140
|
+
).void
|
|
2141
|
+
end
|
|
2142
|
+
attr_writer :tmpfs_options
|
|
2143
|
+
|
|
2144
|
+
# The mount type. Available types:
|
|
2145
|
+
#
|
|
2146
|
+
# - `bind` a mount of a file or directory from the host into the container.
|
|
2147
|
+
# - `cluster` a Swarm cluster volume.
|
|
2148
|
+
# - `image` an OCI image.
|
|
2149
|
+
# - `npipe` a named pipe from the host into the container.
|
|
2150
|
+
# - `tmpfs` a `tmpfs`.
|
|
2151
|
+
# - `volume` a docker volume with the given `Name`.
|
|
2152
|
+
sig do
|
|
2153
|
+
returns(
|
|
2154
|
+
T.nilable(
|
|
2155
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::OrSymbol
|
|
2156
|
+
)
|
|
2157
|
+
)
|
|
2158
|
+
end
|
|
2159
|
+
attr_reader :type
|
|
2160
|
+
|
|
2161
|
+
sig do
|
|
2162
|
+
params(
|
|
2163
|
+
type:
|
|
2164
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::OrSymbol
|
|
2165
|
+
).void
|
|
2166
|
+
end
|
|
2167
|
+
attr_writer :type
|
|
2168
|
+
|
|
2169
|
+
# Optional configuration for the `volume` type.
|
|
2170
|
+
sig do
|
|
2171
|
+
returns(
|
|
2172
|
+
T.nilable(
|
|
2173
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions
|
|
2174
|
+
)
|
|
2175
|
+
)
|
|
2176
|
+
end
|
|
2177
|
+
attr_reader :volume_options
|
|
2178
|
+
|
|
2179
|
+
sig do
|
|
2180
|
+
params(
|
|
2181
|
+
volume_options:
|
|
2182
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::OrHash
|
|
2183
|
+
).void
|
|
2184
|
+
end
|
|
2185
|
+
attr_writer :volume_options
|
|
2186
|
+
|
|
2187
|
+
sig do
|
|
2188
|
+
params(
|
|
2189
|
+
bind_options:
|
|
2190
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::OrHash,
|
|
2191
|
+
consistency: String,
|
|
2192
|
+
image_options:
|
|
2193
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions::OrHash,
|
|
2194
|
+
read_only: T::Boolean,
|
|
2195
|
+
source: String,
|
|
2196
|
+
target: String,
|
|
2197
|
+
tmpfs_options:
|
|
2198
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions::OrHash,
|
|
2199
|
+
type:
|
|
2200
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::OrSymbol,
|
|
2201
|
+
volume_options:
|
|
2202
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::OrHash
|
|
2203
|
+
).returns(T.attached_class)
|
|
2204
|
+
end
|
|
2205
|
+
def self.new(
|
|
2206
|
+
# Optional configuration for the `bind` type.
|
|
2207
|
+
bind_options: nil,
|
|
2208
|
+
# The consistency requirement for the mount: `default`, `consistent`, `cached`, or
|
|
2209
|
+
# `delegated`.
|
|
2210
|
+
consistency: nil,
|
|
2211
|
+
# Optional configuration for the `image` type.
|
|
2212
|
+
image_options: nil,
|
|
2213
|
+
# Whether the mount should be read-only.
|
|
2214
|
+
read_only: nil,
|
|
2215
|
+
# Mount source (e.g. a volume name, a host path). The source cannot be specified
|
|
2216
|
+
# when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
|
|
2217
|
+
# the `CreateMountpoint` must be set to `true` to create the source path on the
|
|
2218
|
+
# host if missing.
|
|
2219
|
+
#
|
|
2220
|
+
# For `Type=npipe`, the pipe must exist prior to creating the container.
|
|
2221
|
+
source: nil,
|
|
2222
|
+
# Container path.
|
|
2223
|
+
target: nil,
|
|
2224
|
+
# Optional configuration for the `tmpfs` type.
|
|
2225
|
+
tmpfs_options: nil,
|
|
2226
|
+
# The mount type. Available types:
|
|
2227
|
+
#
|
|
2228
|
+
# - `bind` a mount of a file or directory from the host into the container.
|
|
2229
|
+
# - `cluster` a Swarm cluster volume.
|
|
2230
|
+
# - `image` an OCI image.
|
|
2231
|
+
# - `npipe` a named pipe from the host into the container.
|
|
2232
|
+
# - `tmpfs` a `tmpfs`.
|
|
2233
|
+
# - `volume` a docker volume with the given `Name`.
|
|
2234
|
+
type: nil,
|
|
2235
|
+
# Optional configuration for the `volume` type.
|
|
2236
|
+
volume_options: nil
|
|
2237
|
+
)
|
|
2238
|
+
end
|
|
2239
|
+
|
|
2240
|
+
sig do
|
|
2241
|
+
override.returns(
|
|
2242
|
+
{
|
|
2243
|
+
bind_options:
|
|
2244
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions,
|
|
2245
|
+
consistency: String,
|
|
2246
|
+
image_options:
|
|
2247
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions,
|
|
2248
|
+
read_only: T::Boolean,
|
|
2249
|
+
source: String,
|
|
2250
|
+
target: String,
|
|
2251
|
+
tmpfs_options:
|
|
2252
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions,
|
|
2253
|
+
type:
|
|
2254
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::OrSymbol,
|
|
2255
|
+
volume_options:
|
|
2256
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions
|
|
2257
|
+
}
|
|
2258
|
+
)
|
|
2259
|
+
end
|
|
2260
|
+
def to_hash
|
|
2261
|
+
end
|
|
2262
|
+
|
|
2263
|
+
class BindOptions < DockerEngine::Internal::Type::BaseModel
|
|
2264
|
+
OrHash =
|
|
2265
|
+
T.type_alias do
|
|
2266
|
+
T.any(
|
|
2267
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions,
|
|
2268
|
+
DockerEngine::Internal::AnyHash
|
|
2269
|
+
)
|
|
2270
|
+
end
|
|
2271
|
+
|
|
2272
|
+
# Create mount point on host if missing
|
|
2273
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2274
|
+
attr_reader :create_mountpoint
|
|
2275
|
+
|
|
2276
|
+
sig { params(create_mountpoint: T::Boolean).void }
|
|
2277
|
+
attr_writer :create_mountpoint
|
|
2278
|
+
|
|
2279
|
+
# Disable recursive bind mount.
|
|
2280
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2281
|
+
attr_reader :non_recursive
|
|
2282
|
+
|
|
2283
|
+
sig { params(non_recursive: T::Boolean).void }
|
|
2284
|
+
attr_writer :non_recursive
|
|
2285
|
+
|
|
2286
|
+
# A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
|
|
2287
|
+
sig do
|
|
2288
|
+
returns(
|
|
2289
|
+
T.nilable(
|
|
2290
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::OrSymbol
|
|
2291
|
+
)
|
|
2292
|
+
)
|
|
2293
|
+
end
|
|
2294
|
+
attr_reader :propagation
|
|
2295
|
+
|
|
2296
|
+
sig do
|
|
2297
|
+
params(
|
|
2298
|
+
propagation:
|
|
2299
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::OrSymbol
|
|
2300
|
+
).void
|
|
2301
|
+
end
|
|
2302
|
+
attr_writer :propagation
|
|
2303
|
+
|
|
2304
|
+
# Raise an error if the mount cannot be made recursively read-only.
|
|
2305
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2306
|
+
attr_reader :read_only_force_recursive
|
|
2307
|
+
|
|
2308
|
+
sig { params(read_only_force_recursive: T::Boolean).void }
|
|
2309
|
+
attr_writer :read_only_force_recursive
|
|
2310
|
+
|
|
2311
|
+
# Make the mount non-recursively read-only, but still leave the mount recursive
|
|
2312
|
+
# (unless NonRecursive is set to `true` in conjunction).
|
|
2313
|
+
#
|
|
2314
|
+
# Added in v1.44, before that version all read-only mounts were non-recursive by
|
|
2315
|
+
# default. To match the previous behaviour this will default to `true` for clients
|
|
2316
|
+
# on versions prior to v1.44.
|
|
2317
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2318
|
+
attr_reader :read_only_non_recursive
|
|
2319
|
+
|
|
2320
|
+
sig { params(read_only_non_recursive: T::Boolean).void }
|
|
2321
|
+
attr_writer :read_only_non_recursive
|
|
2322
|
+
|
|
2323
|
+
# Optional configuration for the `bind` type.
|
|
2324
|
+
sig do
|
|
2325
|
+
params(
|
|
2326
|
+
create_mountpoint: T::Boolean,
|
|
2327
|
+
non_recursive: T::Boolean,
|
|
2328
|
+
propagation:
|
|
2329
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::OrSymbol,
|
|
2330
|
+
read_only_force_recursive: T::Boolean,
|
|
2331
|
+
read_only_non_recursive: T::Boolean
|
|
2332
|
+
).returns(T.attached_class)
|
|
2333
|
+
end
|
|
2334
|
+
def self.new(
|
|
2335
|
+
# Create mount point on host if missing
|
|
2336
|
+
create_mountpoint: nil,
|
|
2337
|
+
# Disable recursive bind mount.
|
|
2338
|
+
non_recursive: nil,
|
|
2339
|
+
# A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
|
|
2340
|
+
propagation: nil,
|
|
2341
|
+
# Raise an error if the mount cannot be made recursively read-only.
|
|
2342
|
+
read_only_force_recursive: nil,
|
|
2343
|
+
# Make the mount non-recursively read-only, but still leave the mount recursive
|
|
2344
|
+
# (unless NonRecursive is set to `true` in conjunction).
|
|
2345
|
+
#
|
|
2346
|
+
# Added in v1.44, before that version all read-only mounts were non-recursive by
|
|
2347
|
+
# default. To match the previous behaviour this will default to `true` for clients
|
|
2348
|
+
# on versions prior to v1.44.
|
|
2349
|
+
read_only_non_recursive: nil
|
|
2350
|
+
)
|
|
2351
|
+
end
|
|
2352
|
+
|
|
2353
|
+
sig do
|
|
2354
|
+
override.returns(
|
|
2355
|
+
{
|
|
2356
|
+
create_mountpoint: T::Boolean,
|
|
2357
|
+
non_recursive: T::Boolean,
|
|
2358
|
+
propagation:
|
|
2359
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::OrSymbol,
|
|
2360
|
+
read_only_force_recursive: T::Boolean,
|
|
2361
|
+
read_only_non_recursive: T::Boolean
|
|
2362
|
+
}
|
|
2363
|
+
)
|
|
2364
|
+
end
|
|
2365
|
+
def to_hash
|
|
2366
|
+
end
|
|
2367
|
+
|
|
2368
|
+
# A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
|
|
2369
|
+
module Propagation
|
|
2370
|
+
extend DockerEngine::Internal::Type::Enum
|
|
2371
|
+
|
|
2372
|
+
TaggedSymbol =
|
|
2373
|
+
T.type_alias do
|
|
2374
|
+
T.all(
|
|
2375
|
+
Symbol,
|
|
2376
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation
|
|
2377
|
+
)
|
|
2378
|
+
end
|
|
2379
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2380
|
+
|
|
2381
|
+
PRIVATE =
|
|
2382
|
+
T.let(
|
|
2383
|
+
:private,
|
|
2384
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2385
|
+
)
|
|
2386
|
+
RPRIVATE =
|
|
2387
|
+
T.let(
|
|
2388
|
+
:rprivate,
|
|
2389
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2390
|
+
)
|
|
2391
|
+
SHARED =
|
|
2392
|
+
T.let(
|
|
2393
|
+
:shared,
|
|
2394
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2395
|
+
)
|
|
2396
|
+
RSHARED =
|
|
2397
|
+
T.let(
|
|
2398
|
+
:rshared,
|
|
2399
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2400
|
+
)
|
|
2401
|
+
SLAVE =
|
|
2402
|
+
T.let(
|
|
2403
|
+
:slave,
|
|
2404
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2405
|
+
)
|
|
2406
|
+
RSLAVE =
|
|
2407
|
+
T.let(
|
|
2408
|
+
:rslave,
|
|
2409
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2410
|
+
)
|
|
2411
|
+
|
|
2412
|
+
sig do
|
|
2413
|
+
override.returns(
|
|
2414
|
+
T::Array[
|
|
2415
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
|
|
2416
|
+
]
|
|
2417
|
+
)
|
|
2418
|
+
end
|
|
2419
|
+
def self.values
|
|
2420
|
+
end
|
|
2421
|
+
end
|
|
2422
|
+
end
|
|
2423
|
+
|
|
2424
|
+
class ImageOptions < DockerEngine::Internal::Type::BaseModel
|
|
2425
|
+
OrHash =
|
|
2426
|
+
T.type_alias do
|
|
2427
|
+
T.any(
|
|
2428
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions,
|
|
2429
|
+
DockerEngine::Internal::AnyHash
|
|
2430
|
+
)
|
|
2431
|
+
end
|
|
2432
|
+
|
|
2433
|
+
# Source path inside the image. Must be relative without any back traversals.
|
|
2434
|
+
sig { returns(T.nilable(String)) }
|
|
2435
|
+
attr_reader :subpath
|
|
2436
|
+
|
|
2437
|
+
sig { params(subpath: String).void }
|
|
2438
|
+
attr_writer :subpath
|
|
2439
|
+
|
|
2440
|
+
# Optional configuration for the `image` type.
|
|
2441
|
+
sig { params(subpath: String).returns(T.attached_class) }
|
|
2442
|
+
def self.new(
|
|
2443
|
+
# Source path inside the image. Must be relative without any back traversals.
|
|
2444
|
+
subpath: nil
|
|
2445
|
+
)
|
|
2446
|
+
end
|
|
2447
|
+
|
|
2448
|
+
sig { override.returns({ subpath: String }) }
|
|
2449
|
+
def to_hash
|
|
2450
|
+
end
|
|
2451
|
+
end
|
|
2452
|
+
|
|
2453
|
+
class TmpfsOptions < DockerEngine::Internal::Type::BaseModel
|
|
2454
|
+
OrHash =
|
|
2455
|
+
T.type_alias do
|
|
2456
|
+
T.any(
|
|
2457
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions,
|
|
2458
|
+
DockerEngine::Internal::AnyHash
|
|
2459
|
+
)
|
|
2460
|
+
end
|
|
2461
|
+
|
|
2462
|
+
# The permission mode for the tmpfs mount in an integer. The value must not be in
|
|
2463
|
+
# octal format (e.g. 755) but rather the decimal representation of the octal value
|
|
2464
|
+
# (e.g. 493).
|
|
2465
|
+
sig { returns(T.nilable(Integer)) }
|
|
2466
|
+
attr_reader :mode
|
|
2467
|
+
|
|
2468
|
+
sig { params(mode: Integer).void }
|
|
2469
|
+
attr_writer :mode
|
|
2470
|
+
|
|
2471
|
+
# The options to be passed to the tmpfs mount. An array of arrays. Flag options
|
|
2472
|
+
# should be provided as 1-length arrays. Other types should be provided as as
|
|
2473
|
+
# 2-length arrays, where the first item is the key and the second the value.
|
|
2474
|
+
sig { returns(T.nilable(T::Array[T::Array[String]])) }
|
|
2475
|
+
attr_reader :options
|
|
2476
|
+
|
|
2477
|
+
sig { params(options: T::Array[T::Array[String]]).void }
|
|
2478
|
+
attr_writer :options
|
|
2479
|
+
|
|
2480
|
+
# The size for the tmpfs mount in bytes.
|
|
2481
|
+
sig { returns(T.nilable(Integer)) }
|
|
2482
|
+
attr_reader :size_bytes
|
|
2483
|
+
|
|
2484
|
+
sig { params(size_bytes: Integer).void }
|
|
2485
|
+
attr_writer :size_bytes
|
|
2486
|
+
|
|
2487
|
+
# Optional configuration for the `tmpfs` type.
|
|
2488
|
+
sig do
|
|
2489
|
+
params(
|
|
2490
|
+
mode: Integer,
|
|
2491
|
+
options: T::Array[T::Array[String]],
|
|
2492
|
+
size_bytes: Integer
|
|
2493
|
+
).returns(T.attached_class)
|
|
2494
|
+
end
|
|
2495
|
+
def self.new(
|
|
2496
|
+
# The permission mode for the tmpfs mount in an integer. The value must not be in
|
|
2497
|
+
# octal format (e.g. 755) but rather the decimal representation of the octal value
|
|
2498
|
+
# (e.g. 493).
|
|
2499
|
+
mode: nil,
|
|
2500
|
+
# The options to be passed to the tmpfs mount. An array of arrays. Flag options
|
|
2501
|
+
# should be provided as 1-length arrays. Other types should be provided as as
|
|
2502
|
+
# 2-length arrays, where the first item is the key and the second the value.
|
|
2503
|
+
options: nil,
|
|
2504
|
+
# The size for the tmpfs mount in bytes.
|
|
2505
|
+
size_bytes: nil
|
|
2506
|
+
)
|
|
2507
|
+
end
|
|
2508
|
+
|
|
2509
|
+
sig do
|
|
2510
|
+
override.returns(
|
|
2511
|
+
{
|
|
2512
|
+
mode: Integer,
|
|
2513
|
+
options: T::Array[T::Array[String]],
|
|
2514
|
+
size_bytes: Integer
|
|
2515
|
+
}
|
|
2516
|
+
)
|
|
2517
|
+
end
|
|
2518
|
+
def to_hash
|
|
2519
|
+
end
|
|
2520
|
+
end
|
|
2521
|
+
|
|
2522
|
+
# The mount type. Available types:
|
|
2523
|
+
#
|
|
2524
|
+
# - `bind` a mount of a file or directory from the host into the container.
|
|
2525
|
+
# - `cluster` a Swarm cluster volume.
|
|
2526
|
+
# - `image` an OCI image.
|
|
2527
|
+
# - `npipe` a named pipe from the host into the container.
|
|
2528
|
+
# - `tmpfs` a `tmpfs`.
|
|
2529
|
+
# - `volume` a docker volume with the given `Name`.
|
|
2530
|
+
module Type
|
|
2531
|
+
extend DockerEngine::Internal::Type::Enum
|
|
2532
|
+
|
|
2533
|
+
TaggedSymbol =
|
|
2534
|
+
T.type_alias do
|
|
2535
|
+
T.all(
|
|
2536
|
+
Symbol,
|
|
2537
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type
|
|
2538
|
+
)
|
|
2539
|
+
end
|
|
2540
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2541
|
+
|
|
2542
|
+
BIND =
|
|
2543
|
+
T.let(
|
|
2544
|
+
:bind,
|
|
2545
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2546
|
+
)
|
|
2547
|
+
CLUSTER =
|
|
2548
|
+
T.let(
|
|
2549
|
+
:cluster,
|
|
2550
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2551
|
+
)
|
|
2552
|
+
IMAGE =
|
|
2553
|
+
T.let(
|
|
2554
|
+
:image,
|
|
2555
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2556
|
+
)
|
|
2557
|
+
NPIPE =
|
|
2558
|
+
T.let(
|
|
2559
|
+
:npipe,
|
|
2560
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2561
|
+
)
|
|
2562
|
+
TMPFS =
|
|
2563
|
+
T.let(
|
|
2564
|
+
:tmpfs,
|
|
2565
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2566
|
+
)
|
|
2567
|
+
VOLUME =
|
|
2568
|
+
T.let(
|
|
2569
|
+
:volume,
|
|
2570
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2571
|
+
)
|
|
2572
|
+
|
|
2573
|
+
sig do
|
|
2574
|
+
override.returns(
|
|
2575
|
+
T::Array[
|
|
2576
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::Type::TaggedSymbol
|
|
2577
|
+
]
|
|
2578
|
+
)
|
|
2579
|
+
end
|
|
2580
|
+
def self.values
|
|
2581
|
+
end
|
|
2582
|
+
end
|
|
2583
|
+
|
|
2584
|
+
class VolumeOptions < DockerEngine::Internal::Type::BaseModel
|
|
2585
|
+
OrHash =
|
|
2586
|
+
T.type_alias do
|
|
2587
|
+
T.any(
|
|
2588
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions,
|
|
2589
|
+
DockerEngine::Internal::AnyHash
|
|
2590
|
+
)
|
|
2591
|
+
end
|
|
2592
|
+
|
|
2593
|
+
# Map of driver specific options
|
|
2594
|
+
sig do
|
|
2595
|
+
returns(
|
|
2596
|
+
T.nilable(
|
|
2597
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig
|
|
2598
|
+
)
|
|
2599
|
+
)
|
|
2600
|
+
end
|
|
2601
|
+
attr_reader :driver_config
|
|
2602
|
+
|
|
2603
|
+
sig do
|
|
2604
|
+
params(
|
|
2605
|
+
driver_config:
|
|
2606
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig::OrHash
|
|
2607
|
+
).void
|
|
2608
|
+
end
|
|
2609
|
+
attr_writer :driver_config
|
|
2610
|
+
|
|
2611
|
+
# User-defined key/value metadata.
|
|
2612
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
2613
|
+
attr_reader :labels
|
|
2614
|
+
|
|
2615
|
+
sig { params(labels: T::Hash[Symbol, String]).void }
|
|
2616
|
+
attr_writer :labels
|
|
2617
|
+
|
|
2618
|
+
# Populate volume with data from the target.
|
|
2619
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2620
|
+
attr_reader :no_copy
|
|
2621
|
+
|
|
2622
|
+
sig { params(no_copy: T::Boolean).void }
|
|
2623
|
+
attr_writer :no_copy
|
|
2624
|
+
|
|
2625
|
+
# Source path inside the volume. Must be relative without any back traversals.
|
|
2626
|
+
sig { returns(T.nilable(String)) }
|
|
2627
|
+
attr_reader :subpath
|
|
2628
|
+
|
|
2629
|
+
sig { params(subpath: String).void }
|
|
2630
|
+
attr_writer :subpath
|
|
2631
|
+
|
|
2632
|
+
# Optional configuration for the `volume` type.
|
|
2633
|
+
sig do
|
|
2634
|
+
params(
|
|
2635
|
+
driver_config:
|
|
2636
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig::OrHash,
|
|
2637
|
+
labels: T::Hash[Symbol, String],
|
|
2638
|
+
no_copy: T::Boolean,
|
|
2639
|
+
subpath: String
|
|
2640
|
+
).returns(T.attached_class)
|
|
2641
|
+
end
|
|
2642
|
+
def self.new(
|
|
2643
|
+
# Map of driver specific options
|
|
2644
|
+
driver_config: nil,
|
|
2645
|
+
# User-defined key/value metadata.
|
|
2646
|
+
labels: nil,
|
|
2647
|
+
# Populate volume with data from the target.
|
|
2648
|
+
no_copy: nil,
|
|
2649
|
+
# Source path inside the volume. Must be relative without any back traversals.
|
|
2650
|
+
subpath: nil
|
|
2651
|
+
)
|
|
2652
|
+
end
|
|
2653
|
+
|
|
2654
|
+
sig do
|
|
2655
|
+
override.returns(
|
|
2656
|
+
{
|
|
2657
|
+
driver_config:
|
|
2658
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig,
|
|
2659
|
+
labels: T::Hash[Symbol, String],
|
|
2660
|
+
no_copy: T::Boolean,
|
|
2661
|
+
subpath: String
|
|
2662
|
+
}
|
|
2663
|
+
)
|
|
2664
|
+
end
|
|
2665
|
+
def to_hash
|
|
2666
|
+
end
|
|
2667
|
+
|
|
2668
|
+
class DriverConfig < DockerEngine::Internal::Type::BaseModel
|
|
2669
|
+
OrHash =
|
|
2670
|
+
T.type_alias do
|
|
2671
|
+
T.any(
|
|
2672
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig,
|
|
2673
|
+
DockerEngine::Internal::AnyHash
|
|
2674
|
+
)
|
|
2675
|
+
end
|
|
2676
|
+
|
|
2677
|
+
# Name of the driver to use to create the volume.
|
|
2678
|
+
sig { returns(T.nilable(String)) }
|
|
2679
|
+
attr_reader :name
|
|
2680
|
+
|
|
2681
|
+
sig { params(name: String).void }
|
|
2682
|
+
attr_writer :name
|
|
2683
|
+
|
|
2684
|
+
# key/value map of driver specific options.
|
|
2685
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
2686
|
+
attr_reader :options
|
|
2687
|
+
|
|
2688
|
+
sig { params(options: T::Hash[Symbol, String]).void }
|
|
2689
|
+
attr_writer :options
|
|
2690
|
+
|
|
2691
|
+
# Map of driver specific options
|
|
2692
|
+
sig do
|
|
2693
|
+
params(
|
|
2694
|
+
name: String,
|
|
2695
|
+
options: T::Hash[Symbol, String]
|
|
2696
|
+
).returns(T.attached_class)
|
|
2697
|
+
end
|
|
2698
|
+
def self.new(
|
|
2699
|
+
# Name of the driver to use to create the volume.
|
|
2700
|
+
name: nil,
|
|
2701
|
+
# key/value map of driver specific options.
|
|
2702
|
+
options: nil
|
|
2703
|
+
)
|
|
2704
|
+
end
|
|
2705
|
+
|
|
2706
|
+
sig do
|
|
2707
|
+
override.returns(
|
|
2708
|
+
{ name: String, options: T::Hash[Symbol, String] }
|
|
2709
|
+
)
|
|
2710
|
+
end
|
|
2711
|
+
def to_hash
|
|
2712
|
+
end
|
|
2713
|
+
end
|
|
2714
|
+
end
|
|
2715
|
+
end
|
|
2716
|
+
|
|
2717
|
+
class PortBinding < DockerEngine::Internal::Type::BaseModel
|
|
2718
|
+
OrHash =
|
|
2719
|
+
T.type_alias do
|
|
2720
|
+
T.any(
|
|
2721
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::PortBinding,
|
|
2722
|
+
DockerEngine::Internal::AnyHash
|
|
2723
|
+
)
|
|
2724
|
+
end
|
|
2725
|
+
|
|
2726
|
+
# Host IP address that the container's port is mapped to.
|
|
2727
|
+
sig { returns(T.nilable(String)) }
|
|
2728
|
+
attr_reader :host_ip
|
|
2729
|
+
|
|
2730
|
+
sig { params(host_ip: String).void }
|
|
2731
|
+
attr_writer :host_ip
|
|
2732
|
+
|
|
2733
|
+
# Host port number that the container's port is mapped to.
|
|
2734
|
+
sig { returns(T.nilable(String)) }
|
|
2735
|
+
attr_reader :host_port
|
|
2736
|
+
|
|
2737
|
+
sig { params(host_port: String).void }
|
|
2738
|
+
attr_writer :host_port
|
|
2739
|
+
|
|
2740
|
+
# PortBinding represents a binding between a host IP address and a host port.
|
|
2741
|
+
sig do
|
|
2742
|
+
params(host_ip: String, host_port: String).returns(
|
|
2743
|
+
T.attached_class
|
|
2744
|
+
)
|
|
2745
|
+
end
|
|
2746
|
+
def self.new(
|
|
2747
|
+
# Host IP address that the container's port is mapped to.
|
|
2748
|
+
host_ip: nil,
|
|
2749
|
+
# Host port number that the container's port is mapped to.
|
|
2750
|
+
host_port: nil
|
|
2751
|
+
)
|
|
2752
|
+
end
|
|
2753
|
+
|
|
2754
|
+
sig { override.returns({ host_ip: String, host_port: String }) }
|
|
2755
|
+
def to_hash
|
|
2756
|
+
end
|
|
2757
|
+
end
|
|
2758
|
+
|
|
2759
|
+
class RestartPolicy < DockerEngine::Internal::Type::BaseModel
|
|
2760
|
+
OrHash =
|
|
2761
|
+
T.type_alias do
|
|
2762
|
+
T.any(
|
|
2763
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy,
|
|
2764
|
+
DockerEngine::Internal::AnyHash
|
|
2765
|
+
)
|
|
2766
|
+
end
|
|
2767
|
+
|
|
2768
|
+
# If `on-failure` is used, the number of times to retry before giving up.
|
|
2769
|
+
sig { returns(T.nilable(Integer)) }
|
|
2770
|
+
attr_reader :maximum_retry_count
|
|
2771
|
+
|
|
2772
|
+
sig { params(maximum_retry_count: Integer).void }
|
|
2773
|
+
attr_writer :maximum_retry_count
|
|
2774
|
+
|
|
2775
|
+
# - Empty string means not to restart
|
|
2776
|
+
# - `no` Do not automatically restart
|
|
2777
|
+
# - `always` Always restart
|
|
2778
|
+
# - `unless-stopped` Restart always except when the user has manually stopped the
|
|
2779
|
+
# container
|
|
2780
|
+
# - `on-failure` Restart only when the container exit code is non-zero
|
|
2781
|
+
sig do
|
|
2782
|
+
returns(
|
|
2783
|
+
T.nilable(
|
|
2784
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::OrSymbol
|
|
2785
|
+
)
|
|
2786
|
+
)
|
|
2787
|
+
end
|
|
2788
|
+
attr_reader :name
|
|
2789
|
+
|
|
2790
|
+
sig do
|
|
2791
|
+
params(
|
|
2792
|
+
name:
|
|
2793
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::OrSymbol
|
|
2794
|
+
).void
|
|
2795
|
+
end
|
|
2796
|
+
attr_writer :name
|
|
2797
|
+
|
|
2798
|
+
# The behavior to apply when the container exits. The default is not to restart.
|
|
2799
|
+
#
|
|
2800
|
+
# An ever increasing delay (double the previous delay, starting at 100ms) is added
|
|
2801
|
+
# before each restart to prevent flooding the server.
|
|
2802
|
+
sig do
|
|
2803
|
+
params(
|
|
2804
|
+
maximum_retry_count: Integer,
|
|
2805
|
+
name:
|
|
2806
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::OrSymbol
|
|
2807
|
+
).returns(T.attached_class)
|
|
2808
|
+
end
|
|
2809
|
+
def self.new(
|
|
2810
|
+
# If `on-failure` is used, the number of times to retry before giving up.
|
|
2811
|
+
maximum_retry_count: nil,
|
|
2812
|
+
# - Empty string means not to restart
|
|
2813
|
+
# - `no` Do not automatically restart
|
|
2814
|
+
# - `always` Always restart
|
|
2815
|
+
# - `unless-stopped` Restart always except when the user has manually stopped the
|
|
2816
|
+
# container
|
|
2817
|
+
# - `on-failure` Restart only when the container exit code is non-zero
|
|
2818
|
+
name: nil
|
|
2819
|
+
)
|
|
2820
|
+
end
|
|
2821
|
+
|
|
2822
|
+
sig do
|
|
2823
|
+
override.returns(
|
|
2824
|
+
{
|
|
2825
|
+
maximum_retry_count: Integer,
|
|
2826
|
+
name:
|
|
2827
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::OrSymbol
|
|
2828
|
+
}
|
|
2829
|
+
)
|
|
2830
|
+
end
|
|
2831
|
+
def to_hash
|
|
2832
|
+
end
|
|
2833
|
+
|
|
2834
|
+
# - Empty string means not to restart
|
|
2835
|
+
# - `no` Do not automatically restart
|
|
2836
|
+
# - `always` Always restart
|
|
2837
|
+
# - `unless-stopped` Restart always except when the user has manually stopped the
|
|
2838
|
+
# container
|
|
2839
|
+
# - `on-failure` Restart only when the container exit code is non-zero
|
|
2840
|
+
module Name
|
|
2841
|
+
extend DockerEngine::Internal::Type::Enum
|
|
2842
|
+
|
|
2843
|
+
TaggedSymbol =
|
|
2844
|
+
T.type_alias do
|
|
2845
|
+
T.all(
|
|
2846
|
+
Symbol,
|
|
2847
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name
|
|
2848
|
+
)
|
|
2849
|
+
end
|
|
2850
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2851
|
+
|
|
2852
|
+
EMPTY =
|
|
2853
|
+
T.let(
|
|
2854
|
+
:"",
|
|
2855
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::TaggedSymbol
|
|
2856
|
+
)
|
|
2857
|
+
NO =
|
|
2858
|
+
T.let(
|
|
2859
|
+
:no,
|
|
2860
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::TaggedSymbol
|
|
2861
|
+
)
|
|
2862
|
+
ALWAYS =
|
|
2863
|
+
T.let(
|
|
2864
|
+
:always,
|
|
2865
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::TaggedSymbol
|
|
2866
|
+
)
|
|
2867
|
+
UNLESS_STOPPED =
|
|
2868
|
+
T.let(
|
|
2869
|
+
:"unless-stopped",
|
|
2870
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::TaggedSymbol
|
|
2871
|
+
)
|
|
2872
|
+
ON_FAILURE =
|
|
2873
|
+
T.let(
|
|
2874
|
+
:"on-failure",
|
|
2875
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::TaggedSymbol
|
|
2876
|
+
)
|
|
2877
|
+
|
|
2878
|
+
sig do
|
|
2879
|
+
override.returns(
|
|
2880
|
+
T::Array[
|
|
2881
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name::TaggedSymbol
|
|
2882
|
+
]
|
|
2883
|
+
)
|
|
2884
|
+
end
|
|
2885
|
+
def self.values
|
|
2886
|
+
end
|
|
2887
|
+
end
|
|
2888
|
+
end
|
|
2889
|
+
|
|
2890
|
+
class Ulimit < DockerEngine::Internal::Type::BaseModel
|
|
2891
|
+
OrHash =
|
|
2892
|
+
T.type_alias do
|
|
2893
|
+
T.any(
|
|
2894
|
+
DockerEngine::ContainerCreateParams::Config::HostConfig::Ulimit,
|
|
2895
|
+
DockerEngine::Internal::AnyHash
|
|
2896
|
+
)
|
|
2897
|
+
end
|
|
2898
|
+
|
|
2899
|
+
# Hard limit
|
|
2900
|
+
sig { returns(T.nilable(Integer)) }
|
|
2901
|
+
attr_reader :hard
|
|
2902
|
+
|
|
2903
|
+
sig { params(hard: Integer).void }
|
|
2904
|
+
attr_writer :hard
|
|
2905
|
+
|
|
2906
|
+
# Name of ulimit
|
|
2907
|
+
sig { returns(T.nilable(String)) }
|
|
2908
|
+
attr_reader :name
|
|
2909
|
+
|
|
2910
|
+
sig { params(name: String).void }
|
|
2911
|
+
attr_writer :name
|
|
2912
|
+
|
|
2913
|
+
# Soft limit
|
|
2914
|
+
sig { returns(T.nilable(Integer)) }
|
|
2915
|
+
attr_reader :soft
|
|
2916
|
+
|
|
2917
|
+
sig { params(soft: Integer).void }
|
|
2918
|
+
attr_writer :soft
|
|
2919
|
+
|
|
2920
|
+
sig do
|
|
2921
|
+
params(hard: Integer, name: String, soft: Integer).returns(
|
|
2922
|
+
T.attached_class
|
|
2923
|
+
)
|
|
2924
|
+
end
|
|
2925
|
+
def self.new(
|
|
2926
|
+
# Hard limit
|
|
2927
|
+
hard: nil,
|
|
2928
|
+
# Name of ulimit
|
|
2929
|
+
name: nil,
|
|
2930
|
+
# Soft limit
|
|
2931
|
+
soft: nil
|
|
2932
|
+
)
|
|
2933
|
+
end
|
|
2934
|
+
|
|
2935
|
+
sig do
|
|
2936
|
+
override.returns({ hard: Integer, name: String, soft: Integer })
|
|
2937
|
+
end
|
|
2938
|
+
def to_hash
|
|
2939
|
+
end
|
|
2940
|
+
end
|
|
2941
|
+
end
|
|
2942
|
+
|
|
2943
|
+
class NetworkingConfig < DockerEngine::Internal::Type::BaseModel
|
|
2944
|
+
OrHash =
|
|
2945
|
+
T.type_alias do
|
|
2946
|
+
T.any(
|
|
2947
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig,
|
|
2948
|
+
DockerEngine::Internal::AnyHash
|
|
2949
|
+
)
|
|
2950
|
+
end
|
|
2951
|
+
|
|
2952
|
+
# A mapping of network name to endpoint configuration for that network. The
|
|
2953
|
+
# endpoint configuration can be left empty to connect to that network with no
|
|
2954
|
+
# particular endpoint configuration.
|
|
2955
|
+
sig do
|
|
2956
|
+
returns(
|
|
2957
|
+
T.nilable(
|
|
2958
|
+
T::Hash[
|
|
2959
|
+
Symbol,
|
|
2960
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig
|
|
2961
|
+
]
|
|
2962
|
+
)
|
|
2963
|
+
)
|
|
2964
|
+
end
|
|
2965
|
+
attr_reader :endpoints_config
|
|
2966
|
+
|
|
2967
|
+
sig do
|
|
2968
|
+
params(
|
|
2969
|
+
endpoints_config:
|
|
2970
|
+
T::Hash[
|
|
2971
|
+
Symbol,
|
|
2972
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::OrHash
|
|
2973
|
+
]
|
|
2974
|
+
).void
|
|
2975
|
+
end
|
|
2976
|
+
attr_writer :endpoints_config
|
|
2977
|
+
|
|
2978
|
+
# NetworkingConfig represents the container's networking configuration for each of
|
|
2979
|
+
# its interfaces. It is used for the networking configs specified in the
|
|
2980
|
+
# `docker create` and `docker network connect` commands.
|
|
2981
|
+
sig do
|
|
2982
|
+
params(
|
|
2983
|
+
endpoints_config:
|
|
2984
|
+
T::Hash[
|
|
2985
|
+
Symbol,
|
|
2986
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::OrHash
|
|
2987
|
+
]
|
|
2988
|
+
).returns(T.attached_class)
|
|
2989
|
+
end
|
|
2990
|
+
def self.new(
|
|
2991
|
+
# A mapping of network name to endpoint configuration for that network. The
|
|
2992
|
+
# endpoint configuration can be left empty to connect to that network with no
|
|
2993
|
+
# particular endpoint configuration.
|
|
2994
|
+
endpoints_config: nil
|
|
2995
|
+
)
|
|
2996
|
+
end
|
|
2997
|
+
|
|
2998
|
+
sig do
|
|
2999
|
+
override.returns(
|
|
3000
|
+
{
|
|
3001
|
+
endpoints_config:
|
|
3002
|
+
T::Hash[
|
|
3003
|
+
Symbol,
|
|
3004
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig
|
|
3005
|
+
]
|
|
3006
|
+
}
|
|
3007
|
+
)
|
|
3008
|
+
end
|
|
3009
|
+
def to_hash
|
|
3010
|
+
end
|
|
3011
|
+
|
|
3012
|
+
class EndpointsConfig < DockerEngine::Internal::Type::BaseModel
|
|
3013
|
+
OrHash =
|
|
3014
|
+
T.type_alias do
|
|
3015
|
+
T.any(
|
|
3016
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig,
|
|
3017
|
+
DockerEngine::Internal::AnyHash
|
|
3018
|
+
)
|
|
3019
|
+
end
|
|
3020
|
+
|
|
3021
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
3022
|
+
attr_reader :aliases
|
|
3023
|
+
|
|
3024
|
+
sig { params(aliases: T::Array[String]).void }
|
|
3025
|
+
attr_writer :aliases
|
|
3026
|
+
|
|
3027
|
+
# List of all DNS names an endpoint has on a specific network. This list is based
|
|
3028
|
+
# on the container name, network aliases, container short ID, and hostname.
|
|
3029
|
+
#
|
|
3030
|
+
# These DNS names are non-fully qualified but can contain several dots. You can
|
|
3031
|
+
# get fully qualified DNS names by appending `.<network-name>`. For instance, if
|
|
3032
|
+
# container name is `my.ctr` and the network is named `testnet`, `DNSNames` will
|
|
3033
|
+
# contain `my.ctr` and the FQDN will be `my.ctr.testnet`.
|
|
3034
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
3035
|
+
attr_reader :dns_names
|
|
3036
|
+
|
|
3037
|
+
sig { params(dns_names: T::Array[String]).void }
|
|
3038
|
+
attr_writer :dns_names
|
|
3039
|
+
|
|
3040
|
+
# DriverOpts is a mapping of driver options and values. These options are passed
|
|
3041
|
+
# directly to the driver and are driver specific.
|
|
3042
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
3043
|
+
attr_accessor :driver_opts
|
|
3044
|
+
|
|
3045
|
+
# Unique ID for the service endpoint in a Sandbox.
|
|
3046
|
+
sig { returns(T.nilable(String)) }
|
|
3047
|
+
attr_reader :endpoint_id
|
|
3048
|
+
|
|
3049
|
+
sig { params(endpoint_id: String).void }
|
|
3050
|
+
attr_writer :endpoint_id
|
|
3051
|
+
|
|
3052
|
+
# Gateway address for this network.
|
|
3053
|
+
sig { returns(T.nilable(String)) }
|
|
3054
|
+
attr_reader :gateway
|
|
3055
|
+
|
|
3056
|
+
sig { params(gateway: String).void }
|
|
3057
|
+
attr_writer :gateway
|
|
3058
|
+
|
|
3059
|
+
# Global IPv6 address.
|
|
3060
|
+
sig { returns(T.nilable(String)) }
|
|
3061
|
+
attr_reader :global_i_pv6_address
|
|
3062
|
+
|
|
3063
|
+
sig { params(global_i_pv6_address: String).void }
|
|
3064
|
+
attr_writer :global_i_pv6_address
|
|
3065
|
+
|
|
3066
|
+
# Mask length of the global IPv6 address.
|
|
3067
|
+
sig { returns(T.nilable(Integer)) }
|
|
3068
|
+
attr_reader :global_i_pv6_prefix_len
|
|
3069
|
+
|
|
3070
|
+
sig { params(global_i_pv6_prefix_len: Integer).void }
|
|
3071
|
+
attr_writer :global_i_pv6_prefix_len
|
|
3072
|
+
|
|
3073
|
+
# This property determines which endpoint will provide the default gateway for a
|
|
3074
|
+
# container. The endpoint with the highest priority will be used. If multiple
|
|
3075
|
+
# endpoints have the same priority, endpoints are lexicographically sorted based
|
|
3076
|
+
# on their network name, and the one that sorts first is picked.
|
|
3077
|
+
sig { returns(T.nilable(Integer)) }
|
|
3078
|
+
attr_reader :gw_priority
|
|
3079
|
+
|
|
3080
|
+
sig { params(gw_priority: Integer).void }
|
|
3081
|
+
attr_writer :gw_priority
|
|
3082
|
+
|
|
3083
|
+
# IPv4 address.
|
|
3084
|
+
sig { returns(T.nilable(String)) }
|
|
3085
|
+
attr_reader :ip_address
|
|
3086
|
+
|
|
3087
|
+
sig { params(ip_address: String).void }
|
|
3088
|
+
attr_writer :ip_address
|
|
3089
|
+
|
|
3090
|
+
# EndpointIPAMConfig represents an endpoint's IPAM configuration.
|
|
3091
|
+
sig do
|
|
3092
|
+
returns(
|
|
3093
|
+
T.nilable(
|
|
3094
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig
|
|
3095
|
+
)
|
|
3096
|
+
)
|
|
3097
|
+
end
|
|
3098
|
+
attr_reader :ipam_config
|
|
3099
|
+
|
|
3100
|
+
sig do
|
|
3101
|
+
params(
|
|
3102
|
+
ipam_config:
|
|
3103
|
+
T.nilable(
|
|
3104
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig::OrHash
|
|
3105
|
+
)
|
|
3106
|
+
).void
|
|
3107
|
+
end
|
|
3108
|
+
attr_writer :ipam_config
|
|
3109
|
+
|
|
3110
|
+
# Mask length of the IPv4 address.
|
|
3111
|
+
sig { returns(T.nilable(Integer)) }
|
|
3112
|
+
attr_reader :ip_prefix_len
|
|
3113
|
+
|
|
3114
|
+
sig { params(ip_prefix_len: Integer).void }
|
|
3115
|
+
attr_writer :ip_prefix_len
|
|
3116
|
+
|
|
3117
|
+
# IPv6 gateway address.
|
|
3118
|
+
sig { returns(T.nilable(String)) }
|
|
3119
|
+
attr_reader :i_pv6_gateway
|
|
3120
|
+
|
|
3121
|
+
sig { params(i_pv6_gateway: String).void }
|
|
3122
|
+
attr_writer :i_pv6_gateway
|
|
3123
|
+
|
|
3124
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
3125
|
+
attr_reader :links
|
|
3126
|
+
|
|
3127
|
+
sig { params(links: T::Array[String]).void }
|
|
3128
|
+
attr_writer :links
|
|
3129
|
+
|
|
3130
|
+
# MAC address for the endpoint on this network. The network driver might ignore
|
|
3131
|
+
# this parameter.
|
|
3132
|
+
sig { returns(T.nilable(String)) }
|
|
3133
|
+
attr_reader :mac_address
|
|
3134
|
+
|
|
3135
|
+
sig { params(mac_address: String).void }
|
|
3136
|
+
attr_writer :mac_address
|
|
3137
|
+
|
|
3138
|
+
# Unique ID of the network.
|
|
3139
|
+
sig { returns(T.nilable(String)) }
|
|
3140
|
+
attr_reader :network_id
|
|
3141
|
+
|
|
3142
|
+
sig { params(network_id: String).void }
|
|
3143
|
+
attr_writer :network_id
|
|
3144
|
+
|
|
3145
|
+
# Configuration for a network endpoint.
|
|
3146
|
+
sig do
|
|
3147
|
+
params(
|
|
3148
|
+
aliases: T::Array[String],
|
|
3149
|
+
dns_names: T::Array[String],
|
|
3150
|
+
driver_opts: T.nilable(T::Hash[Symbol, String]),
|
|
3151
|
+
endpoint_id: String,
|
|
3152
|
+
gateway: String,
|
|
3153
|
+
global_i_pv6_address: String,
|
|
3154
|
+
global_i_pv6_prefix_len: Integer,
|
|
3155
|
+
gw_priority: Integer,
|
|
3156
|
+
ip_address: String,
|
|
3157
|
+
ipam_config:
|
|
3158
|
+
T.nilable(
|
|
3159
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig::OrHash
|
|
3160
|
+
),
|
|
3161
|
+
ip_prefix_len: Integer,
|
|
3162
|
+
i_pv6_gateway: String,
|
|
3163
|
+
links: T::Array[String],
|
|
3164
|
+
mac_address: String,
|
|
3165
|
+
network_id: String
|
|
3166
|
+
).returns(T.attached_class)
|
|
3167
|
+
end
|
|
3168
|
+
def self.new(
|
|
3169
|
+
aliases: nil,
|
|
3170
|
+
# List of all DNS names an endpoint has on a specific network. This list is based
|
|
3171
|
+
# on the container name, network aliases, container short ID, and hostname.
|
|
3172
|
+
#
|
|
3173
|
+
# These DNS names are non-fully qualified but can contain several dots. You can
|
|
3174
|
+
# get fully qualified DNS names by appending `.<network-name>`. For instance, if
|
|
3175
|
+
# container name is `my.ctr` and the network is named `testnet`, `DNSNames` will
|
|
3176
|
+
# contain `my.ctr` and the FQDN will be `my.ctr.testnet`.
|
|
3177
|
+
dns_names: nil,
|
|
3178
|
+
# DriverOpts is a mapping of driver options and values. These options are passed
|
|
3179
|
+
# directly to the driver and are driver specific.
|
|
3180
|
+
driver_opts: nil,
|
|
3181
|
+
# Unique ID for the service endpoint in a Sandbox.
|
|
3182
|
+
endpoint_id: nil,
|
|
3183
|
+
# Gateway address for this network.
|
|
3184
|
+
gateway: nil,
|
|
3185
|
+
# Global IPv6 address.
|
|
3186
|
+
global_i_pv6_address: nil,
|
|
3187
|
+
# Mask length of the global IPv6 address.
|
|
3188
|
+
global_i_pv6_prefix_len: nil,
|
|
3189
|
+
# This property determines which endpoint will provide the default gateway for a
|
|
3190
|
+
# container. The endpoint with the highest priority will be used. If multiple
|
|
3191
|
+
# endpoints have the same priority, endpoints are lexicographically sorted based
|
|
3192
|
+
# on their network name, and the one that sorts first is picked.
|
|
3193
|
+
gw_priority: nil,
|
|
3194
|
+
# IPv4 address.
|
|
3195
|
+
ip_address: nil,
|
|
3196
|
+
# EndpointIPAMConfig represents an endpoint's IPAM configuration.
|
|
3197
|
+
ipam_config: nil,
|
|
3198
|
+
# Mask length of the IPv4 address.
|
|
3199
|
+
ip_prefix_len: nil,
|
|
3200
|
+
# IPv6 gateway address.
|
|
3201
|
+
i_pv6_gateway: nil,
|
|
3202
|
+
links: nil,
|
|
3203
|
+
# MAC address for the endpoint on this network. The network driver might ignore
|
|
3204
|
+
# this parameter.
|
|
3205
|
+
mac_address: nil,
|
|
3206
|
+
# Unique ID of the network.
|
|
3207
|
+
network_id: nil
|
|
3208
|
+
)
|
|
3209
|
+
end
|
|
3210
|
+
|
|
3211
|
+
sig do
|
|
3212
|
+
override.returns(
|
|
3213
|
+
{
|
|
3214
|
+
aliases: T::Array[String],
|
|
3215
|
+
dns_names: T::Array[String],
|
|
3216
|
+
driver_opts: T.nilable(T::Hash[Symbol, String]),
|
|
3217
|
+
endpoint_id: String,
|
|
3218
|
+
gateway: String,
|
|
3219
|
+
global_i_pv6_address: String,
|
|
3220
|
+
global_i_pv6_prefix_len: Integer,
|
|
3221
|
+
gw_priority: Integer,
|
|
3222
|
+
ip_address: String,
|
|
3223
|
+
ipam_config:
|
|
3224
|
+
T.nilable(
|
|
3225
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig
|
|
3226
|
+
),
|
|
3227
|
+
ip_prefix_len: Integer,
|
|
3228
|
+
i_pv6_gateway: String,
|
|
3229
|
+
links: T::Array[String],
|
|
3230
|
+
mac_address: String,
|
|
3231
|
+
network_id: String
|
|
3232
|
+
}
|
|
3233
|
+
)
|
|
3234
|
+
end
|
|
3235
|
+
def to_hash
|
|
3236
|
+
end
|
|
3237
|
+
|
|
3238
|
+
class IpamConfig < DockerEngine::Internal::Type::BaseModel
|
|
3239
|
+
OrHash =
|
|
3240
|
+
T.type_alias do
|
|
3241
|
+
T.any(
|
|
3242
|
+
DockerEngine::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig,
|
|
3243
|
+
DockerEngine::Internal::AnyHash
|
|
3244
|
+
)
|
|
3245
|
+
end
|
|
3246
|
+
|
|
3247
|
+
sig { returns(T.nilable(String)) }
|
|
3248
|
+
attr_reader :i_pv4_address
|
|
3249
|
+
|
|
3250
|
+
sig { params(i_pv4_address: String).void }
|
|
3251
|
+
attr_writer :i_pv4_address
|
|
3252
|
+
|
|
3253
|
+
sig { returns(T.nilable(String)) }
|
|
3254
|
+
attr_reader :i_pv6_address
|
|
3255
|
+
|
|
3256
|
+
sig { params(i_pv6_address: String).void }
|
|
3257
|
+
attr_writer :i_pv6_address
|
|
3258
|
+
|
|
3259
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
3260
|
+
attr_reader :link_local_ips
|
|
3261
|
+
|
|
3262
|
+
sig { params(link_local_ips: T::Array[String]).void }
|
|
3263
|
+
attr_writer :link_local_ips
|
|
3264
|
+
|
|
3265
|
+
# EndpointIPAMConfig represents an endpoint's IPAM configuration.
|
|
3266
|
+
sig do
|
|
3267
|
+
params(
|
|
3268
|
+
i_pv4_address: String,
|
|
3269
|
+
i_pv6_address: String,
|
|
3270
|
+
link_local_ips: T::Array[String]
|
|
3271
|
+
).returns(T.attached_class)
|
|
3272
|
+
end
|
|
3273
|
+
def self.new(
|
|
3274
|
+
i_pv4_address: nil,
|
|
3275
|
+
i_pv6_address: nil,
|
|
3276
|
+
link_local_ips: nil
|
|
3277
|
+
)
|
|
3278
|
+
end
|
|
3279
|
+
|
|
3280
|
+
sig do
|
|
3281
|
+
override.returns(
|
|
3282
|
+
{
|
|
3283
|
+
i_pv4_address: String,
|
|
3284
|
+
i_pv6_address: String,
|
|
3285
|
+
link_local_ips: T::Array[String]
|
|
3286
|
+
}
|
|
3287
|
+
)
|
|
3288
|
+
end
|
|
3289
|
+
def to_hash
|
|
3290
|
+
end
|
|
3291
|
+
end
|
|
3292
|
+
end
|
|
3293
|
+
end
|
|
3294
|
+
end
|
|
3295
|
+
end
|
|
3296
|
+
end
|
|
3297
|
+
end
|