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