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,4645 @@
1
+ # typed: strong
2
+
3
+ module DockerEngineAPI
4
+ module Models
5
+ class Container < DockerEngineAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(DockerEngineAPI::Container, DockerEngineAPI::Internal::AnyHash)
9
+ end
10
+
11
+ # The AppArmor profile set for the container.
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :app_armor_profile
14
+
15
+ sig { params(app_armor_profile: String).void }
16
+ attr_writer :app_armor_profile
17
+
18
+ # The arguments to the command being run
19
+ sig { returns(T.nilable(T::Array[String])) }
20
+ attr_reader :args
21
+
22
+ sig { params(args: T::Array[String]).void }
23
+ attr_writer :args
24
+
25
+ # Configuration for a container that is portable between hosts.
26
+ sig { returns(T.nilable(DockerEngineAPI::Config)) }
27
+ attr_reader :config
28
+
29
+ sig { params(config: DockerEngineAPI::Config::OrHash).void }
30
+ attr_writer :config
31
+
32
+ # Date and time at which the container was created, formatted in
33
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
34
+ sig { returns(T.nilable(String)) }
35
+ attr_accessor :created
36
+
37
+ # The storage-driver used for the container's filesystem (graph-driver or
38
+ # snapshotter).
39
+ sig { returns(T.nilable(String)) }
40
+ attr_reader :driver
41
+
42
+ sig { params(driver: String).void }
43
+ attr_writer :driver
44
+
45
+ # IDs of exec instances that are running in the container.
46
+ sig { returns(T.nilable(T::Array[String])) }
47
+ attr_accessor :exec_ids
48
+
49
+ # Information about the storage driver used to store the container's and image's
50
+ # filesystem.
51
+ sig { returns(T.nilable(DockerEngineAPI::Container::GraphDriver)) }
52
+ attr_reader :graph_driver
53
+
54
+ sig do
55
+ params(
56
+ graph_driver: DockerEngineAPI::Container::GraphDriver::OrHash
57
+ ).void
58
+ end
59
+ attr_writer :graph_driver
60
+
61
+ # Container configuration that depends on the host we are running on
62
+ sig { returns(T.nilable(DockerEngineAPI::Container::HostConfig)) }
63
+ attr_reader :host_config
64
+
65
+ sig do
66
+ params(host_config: DockerEngineAPI::Container::HostConfig::OrHash).void
67
+ end
68
+ attr_writer :host_config
69
+
70
+ # Location of the `/etc/hostname` generated for the container on the host.
71
+ #
72
+ # This file is managed through the docker daemon, and should not be accessed or
73
+ # modified by other tools.
74
+ sig { returns(T.nilable(String)) }
75
+ attr_reader :hostname_path
76
+
77
+ sig { params(hostname_path: String).void }
78
+ attr_writer :hostname_path
79
+
80
+ # Location of the `/etc/hosts` generated for the container on the host.
81
+ #
82
+ # This file is managed through the docker daemon, and should not be accessed or
83
+ # modified by other tools.
84
+ sig { returns(T.nilable(String)) }
85
+ attr_reader :hosts_path
86
+
87
+ sig { params(hosts_path: String).void }
88
+ attr_writer :hosts_path
89
+
90
+ # The ID of this container as a 128-bit (64-character) hexadecimal string (32
91
+ # bytes).
92
+ sig { returns(T.nilable(String)) }
93
+ attr_reader :id
94
+
95
+ sig { params(id: String).void }
96
+ attr_writer :id
97
+
98
+ # The ID (digest) of the image that this container was created from.
99
+ sig { returns(T.nilable(String)) }
100
+ attr_reader :image
101
+
102
+ sig { params(image: String).void }
103
+ attr_writer :image
104
+
105
+ # A descriptor struct containing digest, media type, and size, as defined in the
106
+ # [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).
107
+ sig do
108
+ returns(T.nilable(DockerEngineAPI::Container::ImageManifestDescriptor))
109
+ end
110
+ attr_reader :image_manifest_descriptor
111
+
112
+ sig do
113
+ params(
114
+ image_manifest_descriptor:
115
+ DockerEngineAPI::Container::ImageManifestDescriptor::OrHash
116
+ ).void
117
+ end
118
+ attr_writer :image_manifest_descriptor
119
+
120
+ # Location of the file used to buffer the container's logs. Depending on the
121
+ # logging-driver used for the container, this field may be omitted.
122
+ #
123
+ # This file is managed through the docker daemon, and should not be accessed or
124
+ # modified by other tools.
125
+ sig { returns(T.nilable(String)) }
126
+ attr_accessor :log_path
127
+
128
+ # SELinux mount label set for the container.
129
+ sig { returns(T.nilable(String)) }
130
+ attr_reader :mount_label
131
+
132
+ sig { params(mount_label: String).void }
133
+ attr_writer :mount_label
134
+
135
+ # List of mounts used by the container.
136
+ sig { returns(T.nilable(T::Array[DockerEngineAPI::Container::Mount])) }
137
+ attr_reader :mounts
138
+
139
+ sig do
140
+ params(mounts: T::Array[DockerEngineAPI::Container::Mount::OrHash]).void
141
+ end
142
+ attr_writer :mounts
143
+
144
+ # The name associated with this container.
145
+ #
146
+ # For historic reasons, the name may be prefixed with a forward-slash (`/`).
147
+ sig { returns(T.nilable(String)) }
148
+ attr_reader :name
149
+
150
+ sig { params(name: String).void }
151
+ attr_writer :name
152
+
153
+ # NetworkSettings exposes the network settings in the API
154
+ sig { returns(T.nilable(DockerEngineAPI::Container::NetworkSettings)) }
155
+ attr_reader :network_settings
156
+
157
+ sig do
158
+ params(
159
+ network_settings: DockerEngineAPI::Container::NetworkSettings::OrHash
160
+ ).void
161
+ end
162
+ attr_writer :network_settings
163
+
164
+ # The path to the command being run
165
+ sig { returns(T.nilable(String)) }
166
+ attr_reader :path
167
+
168
+ sig { params(path: String).void }
169
+ attr_writer :path
170
+
171
+ # The platform (operating system) for which the container was created.
172
+ #
173
+ # This field was introduced for the experimental "LCOW" (Linux Containers On
174
+ # Windows) features, which has been removed. In most cases, this field is equal to
175
+ # the host's operating system (`linux` or `windows`).
176
+ sig { returns(T.nilable(String)) }
177
+ attr_reader :platform
178
+
179
+ sig { params(platform: String).void }
180
+ attr_writer :platform
181
+
182
+ # SELinux process label set for the container.
183
+ sig { returns(T.nilable(String)) }
184
+ attr_reader :process_label
185
+
186
+ sig { params(process_label: String).void }
187
+ attr_writer :process_label
188
+
189
+ # Location of the `/etc/resolv.conf` generated for the container on the host.
190
+ #
191
+ # This file is managed through the docker daemon, and should not be accessed or
192
+ # modified by other tools.
193
+ sig { returns(T.nilable(String)) }
194
+ attr_reader :resolv_conf_path
195
+
196
+ sig { params(resolv_conf_path: String).void }
197
+ attr_writer :resolv_conf_path
198
+
199
+ # Number of times the container was restarted since it was created, or since
200
+ # daemon was started.
201
+ sig { returns(T.nilable(Integer)) }
202
+ attr_reader :restart_count
203
+
204
+ sig { params(restart_count: Integer).void }
205
+ attr_writer :restart_count
206
+
207
+ # The total size of all files in the read-only layers from the image that the
208
+ # container uses. These layers can be shared between containers.
209
+ #
210
+ # This field is omitted by default, and only set when size is requested in the API
211
+ # request.
212
+ sig { returns(T.nilable(Integer)) }
213
+ attr_accessor :size_root_fs
214
+
215
+ # The size of files that have been created or changed by this container.
216
+ #
217
+ # This field is omitted by default, and only set when size is requested in the API
218
+ # request.
219
+ sig { returns(T.nilable(Integer)) }
220
+ attr_accessor :size_rw
221
+
222
+ # ContainerState stores container's running state. It's part of ContainerJSONBase
223
+ # and will be returned by the "inspect" command.
224
+ sig { returns(T.nilable(DockerEngineAPI::Container::State)) }
225
+ attr_reader :state
226
+
227
+ sig do
228
+ params(state: T.nilable(DockerEngineAPI::Container::State::OrHash)).void
229
+ end
230
+ attr_writer :state
231
+
232
+ # Information about the storage used by the container.
233
+ sig { returns(T.nilable(DockerEngineAPI::Container::Storage)) }
234
+ attr_reader :storage
235
+
236
+ sig { params(storage: DockerEngineAPI::Container::Storage::OrHash).void }
237
+ attr_writer :storage
238
+
239
+ sig do
240
+ params(
241
+ app_armor_profile: String,
242
+ args: T::Array[String],
243
+ config: DockerEngineAPI::Config::OrHash,
244
+ created: T.nilable(String),
245
+ driver: String,
246
+ exec_ids: T.nilable(T::Array[String]),
247
+ graph_driver: DockerEngineAPI::Container::GraphDriver::OrHash,
248
+ host_config: DockerEngineAPI::Container::HostConfig::OrHash,
249
+ hostname_path: String,
250
+ hosts_path: String,
251
+ id: String,
252
+ image: String,
253
+ image_manifest_descriptor:
254
+ DockerEngineAPI::Container::ImageManifestDescriptor::OrHash,
255
+ log_path: T.nilable(String),
256
+ mount_label: String,
257
+ mounts: T::Array[DockerEngineAPI::Container::Mount::OrHash],
258
+ name: String,
259
+ network_settings: DockerEngineAPI::Container::NetworkSettings::OrHash,
260
+ path: String,
261
+ platform: String,
262
+ process_label: String,
263
+ resolv_conf_path: String,
264
+ restart_count: Integer,
265
+ size_root_fs: T.nilable(Integer),
266
+ size_rw: T.nilable(Integer),
267
+ state: T.nilable(DockerEngineAPI::Container::State::OrHash),
268
+ storage: DockerEngineAPI::Container::Storage::OrHash
269
+ ).returns(T.attached_class)
270
+ end
271
+ def self.new(
272
+ # The AppArmor profile set for the container.
273
+ app_armor_profile: nil,
274
+ # The arguments to the command being run
275
+ args: nil,
276
+ # Configuration for a container that is portable between hosts.
277
+ config: nil,
278
+ # Date and time at which the container was created, formatted in
279
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
280
+ created: nil,
281
+ # The storage-driver used for the container's filesystem (graph-driver or
282
+ # snapshotter).
283
+ driver: nil,
284
+ # IDs of exec instances that are running in the container.
285
+ exec_ids: nil,
286
+ # Information about the storage driver used to store the container's and image's
287
+ # filesystem.
288
+ graph_driver: nil,
289
+ # Container configuration that depends on the host we are running on
290
+ host_config: nil,
291
+ # Location of the `/etc/hostname` generated for the container on the host.
292
+ #
293
+ # This file is managed through the docker daemon, and should not be accessed or
294
+ # modified by other tools.
295
+ hostname_path: nil,
296
+ # Location of the `/etc/hosts` generated for the container on the host.
297
+ #
298
+ # This file is managed through the docker daemon, and should not be accessed or
299
+ # modified by other tools.
300
+ hosts_path: nil,
301
+ # The ID of this container as a 128-bit (64-character) hexadecimal string (32
302
+ # bytes).
303
+ id: nil,
304
+ # The ID (digest) of the image that this container was created from.
305
+ image: nil,
306
+ # A descriptor struct containing digest, media type, and size, as defined in the
307
+ # [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).
308
+ image_manifest_descriptor: nil,
309
+ # Location of the file used to buffer the container's logs. Depending on the
310
+ # logging-driver used for the container, this field may be omitted.
311
+ #
312
+ # This file is managed through the docker daemon, and should not be accessed or
313
+ # modified by other tools.
314
+ log_path: nil,
315
+ # SELinux mount label set for the container.
316
+ mount_label: nil,
317
+ # List of mounts used by the container.
318
+ mounts: nil,
319
+ # The name associated with this container.
320
+ #
321
+ # For historic reasons, the name may be prefixed with a forward-slash (`/`).
322
+ name: nil,
323
+ # NetworkSettings exposes the network settings in the API
324
+ network_settings: nil,
325
+ # The path to the command being run
326
+ path: nil,
327
+ # The platform (operating system) for which the container was created.
328
+ #
329
+ # This field was introduced for the experimental "LCOW" (Linux Containers On
330
+ # Windows) features, which has been removed. In most cases, this field is equal to
331
+ # the host's operating system (`linux` or `windows`).
332
+ platform: nil,
333
+ # SELinux process label set for the container.
334
+ process_label: nil,
335
+ # Location of the `/etc/resolv.conf` generated for the container on the host.
336
+ #
337
+ # This file is managed through the docker daemon, and should not be accessed or
338
+ # modified by other tools.
339
+ resolv_conf_path: nil,
340
+ # Number of times the container was restarted since it was created, or since
341
+ # daemon was started.
342
+ restart_count: nil,
343
+ # The total size of all files in the read-only layers from the image that the
344
+ # container uses. These layers can be shared between containers.
345
+ #
346
+ # This field is omitted by default, and only set when size is requested in the API
347
+ # request.
348
+ size_root_fs: nil,
349
+ # The size of files that have been created or changed by this container.
350
+ #
351
+ # This field is omitted by default, and only set when size is requested in the API
352
+ # request.
353
+ size_rw: nil,
354
+ # ContainerState stores container's running state. It's part of ContainerJSONBase
355
+ # and will be returned by the "inspect" command.
356
+ state: nil,
357
+ # Information about the storage used by the container.
358
+ storage: nil
359
+ )
360
+ end
361
+
362
+ sig do
363
+ override.returns(
364
+ {
365
+ app_armor_profile: String,
366
+ args: T::Array[String],
367
+ config: DockerEngineAPI::Config,
368
+ created: T.nilable(String),
369
+ driver: String,
370
+ exec_ids: T.nilable(T::Array[String]),
371
+ graph_driver: DockerEngineAPI::Container::GraphDriver,
372
+ host_config: DockerEngineAPI::Container::HostConfig,
373
+ hostname_path: String,
374
+ hosts_path: String,
375
+ id: String,
376
+ image: String,
377
+ image_manifest_descriptor:
378
+ DockerEngineAPI::Container::ImageManifestDescriptor,
379
+ log_path: T.nilable(String),
380
+ mount_label: String,
381
+ mounts: T::Array[DockerEngineAPI::Container::Mount],
382
+ name: String,
383
+ network_settings: DockerEngineAPI::Container::NetworkSettings,
384
+ path: String,
385
+ platform: String,
386
+ process_label: String,
387
+ resolv_conf_path: String,
388
+ restart_count: Integer,
389
+ size_root_fs: T.nilable(Integer),
390
+ size_rw: T.nilable(Integer),
391
+ state: T.nilable(DockerEngineAPI::Container::State),
392
+ storage: DockerEngineAPI::Container::Storage
393
+ }
394
+ )
395
+ end
396
+ def to_hash
397
+ end
398
+
399
+ class GraphDriver < DockerEngineAPI::Internal::Type::BaseModel
400
+ OrHash =
401
+ T.type_alias do
402
+ T.any(
403
+ DockerEngineAPI::Container::GraphDriver,
404
+ DockerEngineAPI::Internal::AnyHash
405
+ )
406
+ end
407
+
408
+ # Low-level storage metadata, provided as key/value pairs.
409
+ #
410
+ # This information is driver-specific, and depends on the storage-driver in use,
411
+ # and should be used for informational purposes only.
412
+ sig { returns(T::Hash[Symbol, String]) }
413
+ attr_accessor :data
414
+
415
+ # Name of the storage driver.
416
+ sig { returns(String) }
417
+ attr_accessor :name
418
+
419
+ # Information about the storage driver used to store the container's and image's
420
+ # filesystem.
421
+ sig do
422
+ params(data: T::Hash[Symbol, String], name: String).returns(
423
+ T.attached_class
424
+ )
425
+ end
426
+ def self.new(
427
+ # Low-level storage metadata, provided as key/value pairs.
428
+ #
429
+ # This information is driver-specific, and depends on the storage-driver in use,
430
+ # and should be used for informational purposes only.
431
+ data:,
432
+ # Name of the storage driver.
433
+ name:
434
+ )
435
+ end
436
+
437
+ sig do
438
+ override.returns({ data: T::Hash[Symbol, String], name: String })
439
+ end
440
+ def to_hash
441
+ end
442
+ end
443
+
444
+ class HostConfig < DockerEngineAPI::Internal::Type::BaseModel
445
+ OrHash =
446
+ T.type_alias do
447
+ T.any(
448
+ DockerEngineAPI::Container::HostConfig,
449
+ DockerEngineAPI::Internal::AnyHash
450
+ )
451
+ end
452
+
453
+ # Arbitrary non-identifying metadata attached to container and provided to the
454
+ # runtime when the container is started.
455
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
456
+ attr_reader :annotations
457
+
458
+ sig { params(annotations: T::Hash[Symbol, String]).void }
459
+ attr_writer :annotations
460
+
461
+ # Automatically remove the container when the container's process exits. This has
462
+ # no effect if `RestartPolicy` is set.
463
+ sig { returns(T.nilable(T::Boolean)) }
464
+ attr_reader :auto_remove
465
+
466
+ sig { params(auto_remove: T::Boolean).void }
467
+ attr_writer :auto_remove
468
+
469
+ # A list of volume bindings for this container. Each volume binding is a string in
470
+ # one of these forms:
471
+ #
472
+ # - `host-src:container-dest[:options]` to bind-mount a host path into the
473
+ # container. Both `host-src`, and `container-dest` must be an _absolute_ path.
474
+ # - `volume-name:container-dest[:options]` to bind-mount a volume managed by a
475
+ # volume driver into the container. `container-dest` must be an _absolute_ path.
476
+ #
477
+ # `options` is an optional, comma-delimited list of:
478
+ #
479
+ # - `nocopy` disables automatic copying of data from the container path to the
480
+ # volume. The `nocopy` flag only applies to named volumes.
481
+ # - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or
482
+ # set to `rw`, volumes are mounted read-write.
483
+ # - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read
484
+ # and write to the same volume.
485
+ # - `z`: a _shared_ content label is applied to the content. This label
486
+ # indicates that multiple containers can share the volume content, for both
487
+ # reading and writing.
488
+ # - `Z`: a _private unshared_ label is applied to the content. This label
489
+ # indicates that only the current container can use a private volume. Labeling
490
+ # systems such as SELinux require proper labels to be placed on volume content
491
+ # that is mounted into a container. Without a label, the security system can
492
+ # prevent a container's processes from using the content. By default, the
493
+ # labels set by the host operating system are not modified.
494
+ # - `[[r]shared|[r]slave|[r]private]` specifies mount
495
+ # [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
496
+ # This only applies to bind-mounted volumes, not internal volumes or named
497
+ # volumes. Mount propagation requires the source mount point (the location where
498
+ # the source directory is mounted in the host operating system) to have the
499
+ # correct propagation properties. For shared volumes, the source mount point
500
+ # must be set to `shared`. For slave volumes, the mount must be set to either
501
+ # `shared` or `slave`.
502
+ sig { returns(T.nilable(T::Array[String])) }
503
+ attr_reader :binds
504
+
505
+ sig { params(binds: T::Array[String]).void }
506
+ attr_writer :binds
507
+
508
+ # Limit read rate (bytes per second) from a device, in the form:
509
+ #
510
+ # ```
511
+ # [{"Path": "device_path", "Rate": rate}]
512
+ # ```
513
+ sig do
514
+ returns(
515
+ T.nilable(
516
+ T::Array[
517
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadBp
518
+ ]
519
+ )
520
+ )
521
+ end
522
+ attr_reader :blkio_device_read_bps
523
+
524
+ sig do
525
+ params(
526
+ blkio_device_read_bps:
527
+ T::Array[
528
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadBp::OrHash
529
+ ]
530
+ ).void
531
+ end
532
+ attr_writer :blkio_device_read_bps
533
+
534
+ # Limit read rate (IO per second) from a device, in the form:
535
+ #
536
+ # ```
537
+ # [{"Path": "device_path", "Rate": rate}]
538
+ # ```
539
+ sig do
540
+ returns(
541
+ T.nilable(
542
+ T::Array[
543
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadIOp
544
+ ]
545
+ )
546
+ )
547
+ end
548
+ attr_reader :blkio_device_read_i_ops
549
+
550
+ sig do
551
+ params(
552
+ blkio_device_read_i_ops:
553
+ T::Array[
554
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadIOp::OrHash
555
+ ]
556
+ ).void
557
+ end
558
+ attr_writer :blkio_device_read_i_ops
559
+
560
+ # Limit write rate (bytes per second) to a device, in the form:
561
+ #
562
+ # ```
563
+ # [{"Path": "device_path", "Rate": rate}]
564
+ # ```
565
+ sig do
566
+ returns(
567
+ T.nilable(
568
+ T::Array[
569
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteBp
570
+ ]
571
+ )
572
+ )
573
+ end
574
+ attr_reader :blkio_device_write_bps
575
+
576
+ sig do
577
+ params(
578
+ blkio_device_write_bps:
579
+ T::Array[
580
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteBp::OrHash
581
+ ]
582
+ ).void
583
+ end
584
+ attr_writer :blkio_device_write_bps
585
+
586
+ # Limit write rate (IO per second) to a device, in the form:
587
+ #
588
+ # ```
589
+ # [{"Path": "device_path", "Rate": rate}]
590
+ # ```
591
+ sig do
592
+ returns(
593
+ T.nilable(
594
+ T::Array[
595
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteIOp
596
+ ]
597
+ )
598
+ )
599
+ end
600
+ attr_reader :blkio_device_write_i_ops
601
+
602
+ sig do
603
+ params(
604
+ blkio_device_write_i_ops:
605
+ T::Array[
606
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteIOp::OrHash
607
+ ]
608
+ ).void
609
+ end
610
+ attr_writer :blkio_device_write_i_ops
611
+
612
+ # Block IO weight (relative weight).
613
+ sig { returns(T.nilable(Integer)) }
614
+ attr_reader :blkio_weight
615
+
616
+ sig { params(blkio_weight: Integer).void }
617
+ attr_writer :blkio_weight
618
+
619
+ # Block IO weight (relative device weight) in the form:
620
+ #
621
+ # ```
622
+ # [{"Path": "device_path", "Weight": weight}]
623
+ # ```
624
+ sig do
625
+ returns(
626
+ T.nilable(
627
+ T::Array[
628
+ DockerEngineAPI::Container::HostConfig::BlkioWeightDevice
629
+ ]
630
+ )
631
+ )
632
+ end
633
+ attr_reader :blkio_weight_device
634
+
635
+ sig do
636
+ params(
637
+ blkio_weight_device:
638
+ T::Array[
639
+ DockerEngineAPI::Container::HostConfig::BlkioWeightDevice::OrHash
640
+ ]
641
+ ).void
642
+ end
643
+ attr_writer :blkio_weight_device
644
+
645
+ # A list of kernel capabilities to add to the container. Conflicts with option
646
+ # 'Capabilities'.
647
+ sig { returns(T.nilable(T::Array[String])) }
648
+ attr_reader :cap_add
649
+
650
+ sig { params(cap_add: T::Array[String]).void }
651
+ attr_writer :cap_add
652
+
653
+ # A list of kernel capabilities to drop from the container. Conflicts with option
654
+ # 'Capabilities'.
655
+ sig { returns(T.nilable(T::Array[String])) }
656
+ attr_reader :cap_drop
657
+
658
+ sig { params(cap_drop: T::Array[String]).void }
659
+ attr_writer :cap_drop
660
+
661
+ # Cgroup to use for the container.
662
+ sig { returns(T.nilable(String)) }
663
+ attr_reader :cgroup
664
+
665
+ sig { params(cgroup: String).void }
666
+ attr_writer :cgroup
667
+
668
+ # cgroup namespace mode for the container. Possible values are:
669
+ #
670
+ # - `"private"`: the container runs in its own private cgroup namespace
671
+ # - `"host"`: use the host system's cgroup namespace
672
+ #
673
+ # If not specified, the daemon default is used, which can either be `"private"` or
674
+ # `"host"`, depending on daemon version, kernel support and configuration.
675
+ sig do
676
+ returns(
677
+ T.nilable(
678
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::TaggedSymbol
679
+ )
680
+ )
681
+ end
682
+ attr_reader :cgroupns_mode
683
+
684
+ sig do
685
+ params(
686
+ cgroupns_mode:
687
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::OrSymbol
688
+ ).void
689
+ end
690
+ attr_writer :cgroupns_mode
691
+
692
+ # Path to `cgroups` under which the container's `cgroup` is created. If the path
693
+ # is not absolute, the path is considered to be relative to the `cgroups` path of
694
+ # the init process. Cgroups are created if they do not already exist.
695
+ sig { returns(T.nilable(String)) }
696
+ attr_reader :cgroup_parent
697
+
698
+ sig { params(cgroup_parent: String).void }
699
+ attr_writer :cgroup_parent
700
+
701
+ # Initial console size, as an `[height, width]` array.
702
+ sig { returns(T.nilable(T::Array[Integer])) }
703
+ attr_accessor :console_size
704
+
705
+ # Path to a file where the container ID is written
706
+ sig { returns(T.nilable(String)) }
707
+ attr_reader :container_id_file
708
+
709
+ sig { params(container_id_file: String).void }
710
+ attr_writer :container_id_file
711
+
712
+ # The number of usable CPUs (Windows only).
713
+ #
714
+ # On Windows Server containers, the processor resource controls are mutually
715
+ # exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
716
+ # `CPUPercent` last.
717
+ sig { returns(T.nilable(Integer)) }
718
+ attr_reader :cpu_count
719
+
720
+ sig { params(cpu_count: Integer).void }
721
+ attr_writer :cpu_count
722
+
723
+ # The usable percentage of the available CPUs (Windows only).
724
+ #
725
+ # On Windows Server containers, the processor resource controls are mutually
726
+ # exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
727
+ # `CPUPercent` last.
728
+ sig { returns(T.nilable(Integer)) }
729
+ attr_reader :cpu_percent
730
+
731
+ sig { params(cpu_percent: Integer).void }
732
+ attr_writer :cpu_percent
733
+
734
+ # The length of a CPU period in microseconds.
735
+ sig { returns(T.nilable(Integer)) }
736
+ attr_reader :cpu_period
737
+
738
+ sig { params(cpu_period: Integer).void }
739
+ attr_writer :cpu_period
740
+
741
+ # Microseconds of CPU time that the container can get in a CPU period.
742
+ sig { returns(T.nilable(Integer)) }
743
+ attr_reader :cpu_quota
744
+
745
+ sig { params(cpu_quota: Integer).void }
746
+ attr_writer :cpu_quota
747
+
748
+ # The length of a CPU real-time period in microseconds. Set to 0 to allocate no
749
+ # time allocated to real-time tasks.
750
+ sig { returns(T.nilable(Integer)) }
751
+ attr_reader :cpu_realtime_period
752
+
753
+ sig { params(cpu_realtime_period: Integer).void }
754
+ attr_writer :cpu_realtime_period
755
+
756
+ # The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no
757
+ # time allocated to real-time tasks.
758
+ sig { returns(T.nilable(Integer)) }
759
+ attr_reader :cpu_realtime_runtime
760
+
761
+ sig { params(cpu_realtime_runtime: Integer).void }
762
+ attr_writer :cpu_realtime_runtime
763
+
764
+ # CPUs in which to allow execution (e.g., `0-3`, `0,1`).
765
+ sig { returns(T.nilable(String)) }
766
+ attr_reader :cpuset_cpus
767
+
768
+ sig { params(cpuset_cpus: String).void }
769
+ attr_writer :cpuset_cpus
770
+
771
+ # Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
772
+ # NUMA systems.
773
+ sig { returns(T.nilable(String)) }
774
+ attr_reader :cpuset_mems
775
+
776
+ sig { params(cpuset_mems: String).void }
777
+ attr_writer :cpuset_mems
778
+
779
+ # An integer value representing this container's relative CPU weight versus other
780
+ # containers.
781
+ sig { returns(T.nilable(Integer)) }
782
+ attr_reader :cpu_shares
783
+
784
+ sig { params(cpu_shares: Integer).void }
785
+ attr_writer :cpu_shares
786
+
787
+ # a list of cgroup rules to apply to the container
788
+ sig { returns(T.nilable(T::Array[String])) }
789
+ attr_reader :device_cgroup_rules
790
+
791
+ sig { params(device_cgroup_rules: T::Array[String]).void }
792
+ attr_writer :device_cgroup_rules
793
+
794
+ # A list of requests for devices to be sent to device drivers.
795
+ sig do
796
+ returns(
797
+ T.nilable(
798
+ T::Array[DockerEngineAPI::Container::HostConfig::DeviceRequest]
799
+ )
800
+ )
801
+ end
802
+ attr_reader :device_requests
803
+
804
+ sig do
805
+ params(
806
+ device_requests:
807
+ T::Array[
808
+ DockerEngineAPI::Container::HostConfig::DeviceRequest::OrHash
809
+ ]
810
+ ).void
811
+ end
812
+ attr_writer :device_requests
813
+
814
+ # A list of devices to add to the container.
815
+ sig do
816
+ returns(
817
+ T.nilable(T::Array[DockerEngineAPI::Container::HostConfig::Device])
818
+ )
819
+ end
820
+ attr_reader :devices
821
+
822
+ sig do
823
+ params(
824
+ devices:
825
+ T::Array[DockerEngineAPI::Container::HostConfig::Device::OrHash]
826
+ ).void
827
+ end
828
+ attr_writer :devices
829
+
830
+ # A list of DNS servers for the container to use.
831
+ sig { returns(T.nilable(T::Array[String])) }
832
+ attr_reader :dns
833
+
834
+ sig { params(dns: T::Array[String]).void }
835
+ attr_writer :dns
836
+
837
+ # A list of DNS options.
838
+ sig { returns(T.nilable(T::Array[String])) }
839
+ attr_reader :dns_options
840
+
841
+ sig { params(dns_options: T::Array[String]).void }
842
+ attr_writer :dns_options
843
+
844
+ # A list of DNS search domains.
845
+ sig { returns(T.nilable(T::Array[String])) }
846
+ attr_reader :dns_search
847
+
848
+ sig { params(dns_search: T::Array[String]).void }
849
+ attr_writer :dns_search
850
+
851
+ # A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
852
+ # Specified in the form `["hostname:IP"]`.
853
+ sig { returns(T.nilable(T::Array[String])) }
854
+ attr_reader :extra_hosts
855
+
856
+ sig { params(extra_hosts: T::Array[String]).void }
857
+ attr_writer :extra_hosts
858
+
859
+ # A list of additional groups that the container process will run as.
860
+ sig { returns(T.nilable(T::Array[String])) }
861
+ attr_reader :group_add
862
+
863
+ sig { params(group_add: T::Array[String]).void }
864
+ attr_writer :group_add
865
+
866
+ # Run an init inside the container that forwards signals and reaps processes. This
867
+ # field is omitted if empty, and the default (as configured on the daemon) is
868
+ # used.
869
+ sig { returns(T.nilable(T::Boolean)) }
870
+ attr_accessor :init
871
+
872
+ # Maximum IO in bytes per second for the container system drive (Windows only).
873
+ sig { returns(T.nilable(Integer)) }
874
+ attr_reader :io_maximum_bandwidth
875
+
876
+ sig { params(io_maximum_bandwidth: Integer).void }
877
+ attr_writer :io_maximum_bandwidth
878
+
879
+ # Maximum IOps for the container system drive (Windows only)
880
+ sig { returns(T.nilable(Integer)) }
881
+ attr_reader :io_maximum_i_ops
882
+
883
+ sig { params(io_maximum_i_ops: Integer).void }
884
+ attr_writer :io_maximum_i_ops
885
+
886
+ # IPC sharing mode for the container. Possible values are:
887
+ #
888
+ # - `"none"`: own private IPC namespace, with /dev/shm not mounted
889
+ # - `"private"`: own private IPC namespace
890
+ # - `"shareable"`: own private IPC namespace, with a possibility to share it with
891
+ # other containers
892
+ # - `"container:<name|id>"`: join another (shareable) container's IPC namespace
893
+ # - `"host"`: use the host system's IPC namespace
894
+ #
895
+ # If not specified, daemon default is used, which can either be `"private"` or
896
+ # `"shareable"`, depending on daemon version and configuration.
897
+ sig { returns(T.nilable(String)) }
898
+ attr_reader :ipc_mode
899
+
900
+ sig { params(ipc_mode: String).void }
901
+ attr_writer :ipc_mode
902
+
903
+ # Isolation technology of the container. (Windows only)
904
+ sig do
905
+ returns(
906
+ T.nilable(
907
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol
908
+ )
909
+ )
910
+ end
911
+ attr_reader :isolation
912
+
913
+ sig do
914
+ params(
915
+ isolation:
916
+ DockerEngineAPI::Container::HostConfig::Isolation::OrSymbol
917
+ ).void
918
+ end
919
+ attr_writer :isolation
920
+
921
+ # A list of links for the container in the form `container_name:alias`.
922
+ sig { returns(T.nilable(T::Array[String])) }
923
+ attr_reader :links
924
+
925
+ sig { params(links: T::Array[String]).void }
926
+ attr_writer :links
927
+
928
+ # The logging configuration for this container
929
+ sig do
930
+ returns(T.nilable(DockerEngineAPI::Container::HostConfig::LogConfig))
931
+ end
932
+ attr_reader :log_config
933
+
934
+ sig do
935
+ params(
936
+ log_config:
937
+ DockerEngineAPI::Container::HostConfig::LogConfig::OrHash
938
+ ).void
939
+ end
940
+ attr_writer :log_config
941
+
942
+ # The list of paths to be masked inside the container (this overrides the default
943
+ # set of paths).
944
+ sig { returns(T.nilable(T::Array[String])) }
945
+ attr_reader :masked_paths
946
+
947
+ sig { params(masked_paths: T::Array[String]).void }
948
+ attr_writer :masked_paths
949
+
950
+ # Memory limit in bytes.
951
+ sig { returns(T.nilable(Integer)) }
952
+ attr_reader :memory
953
+
954
+ sig { params(memory: Integer).void }
955
+ attr_writer :memory
956
+
957
+ # Memory soft limit in bytes.
958
+ sig { returns(T.nilable(Integer)) }
959
+ attr_reader :memory_reservation
960
+
961
+ sig { params(memory_reservation: Integer).void }
962
+ attr_writer :memory_reservation
963
+
964
+ # Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.
965
+ sig { returns(T.nilable(Integer)) }
966
+ attr_reader :memory_swap
967
+
968
+ sig { params(memory_swap: Integer).void }
969
+ attr_writer :memory_swap
970
+
971
+ # Tune a container's memory swappiness behavior. Accepts an integer between 0
972
+ # and 100.
973
+ sig { returns(T.nilable(Integer)) }
974
+ attr_reader :memory_swappiness
975
+
976
+ sig { params(memory_swappiness: Integer).void }
977
+ attr_writer :memory_swappiness
978
+
979
+ # Specification for mounts to be added to the container.
980
+ sig do
981
+ returns(
982
+ T.nilable(T::Array[DockerEngineAPI::Container::HostConfig::Mount])
983
+ )
984
+ end
985
+ attr_reader :mounts
986
+
987
+ sig do
988
+ params(
989
+ mounts:
990
+ T::Array[DockerEngineAPI::Container::HostConfig::Mount::OrHash]
991
+ ).void
992
+ end
993
+ attr_writer :mounts
994
+
995
+ # CPU quota in units of 10<sup>-9</sup> CPUs.
996
+ sig { returns(T.nilable(Integer)) }
997
+ attr_reader :nano_cpus
998
+
999
+ sig { params(nano_cpus: Integer).void }
1000
+ attr_writer :nano_cpus
1001
+
1002
+ # Network mode to use for this container. Supported standard values are: `bridge`,
1003
+ # `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom
1004
+ # network's name to which this container should connect to.
1005
+ sig { returns(T.nilable(String)) }
1006
+ attr_reader :network_mode
1007
+
1008
+ sig { params(network_mode: String).void }
1009
+ attr_writer :network_mode
1010
+
1011
+ # Disable OOM Killer for the container.
1012
+ sig { returns(T.nilable(T::Boolean)) }
1013
+ attr_reader :oom_kill_disable
1014
+
1015
+ sig { params(oom_kill_disable: T::Boolean).void }
1016
+ attr_writer :oom_kill_disable
1017
+
1018
+ # An integer value containing the score given to the container in order to tune
1019
+ # OOM killer preferences.
1020
+ sig { returns(T.nilable(Integer)) }
1021
+ attr_reader :oom_score_adj
1022
+
1023
+ sig { params(oom_score_adj: Integer).void }
1024
+ attr_writer :oom_score_adj
1025
+
1026
+ # Set the PID (Process) Namespace mode for the container. It can be either:
1027
+ #
1028
+ # - `"container:<name|id>"`: joins another container's PID namespace
1029
+ # - `"host"`: use the host's PID namespace inside the container
1030
+ sig { returns(T.nilable(String)) }
1031
+ attr_reader :pid_mode
1032
+
1033
+ sig { params(pid_mode: String).void }
1034
+ attr_writer :pid_mode
1035
+
1036
+ # Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not
1037
+ # change.
1038
+ sig { returns(T.nilable(Integer)) }
1039
+ attr_accessor :pids_limit
1040
+
1041
+ # PortMap describes the mapping of container ports to host ports, using the
1042
+ # container's port-number and protocol as key in the format `<port>/<protocol>`,
1043
+ # for example, `80/udp`.
1044
+ #
1045
+ # If a container's port is mapped for multiple protocols, separate entries are
1046
+ # added to the mapping table.
1047
+ sig do
1048
+ returns(
1049
+ T.nilable(
1050
+ T::Hash[
1051
+ Symbol,
1052
+ T::Array[DockerEngineAPI::Container::HostConfig::PortBinding]
1053
+ ]
1054
+ )
1055
+ )
1056
+ end
1057
+ attr_reader :port_bindings
1058
+
1059
+ sig do
1060
+ params(
1061
+ port_bindings:
1062
+ T::Hash[
1063
+ Symbol,
1064
+ T::Array[
1065
+ DockerEngineAPI::Container::HostConfig::PortBinding::OrHash
1066
+ ]
1067
+ ]
1068
+ ).void
1069
+ end
1070
+ attr_writer :port_bindings
1071
+
1072
+ # Gives the container full access to the host.
1073
+ sig { returns(T.nilable(T::Boolean)) }
1074
+ attr_reader :privileged
1075
+
1076
+ sig { params(privileged: T::Boolean).void }
1077
+ attr_writer :privileged
1078
+
1079
+ # Allocates an ephemeral host port for all of a container's exposed ports.
1080
+ #
1081
+ # Ports are de-allocated when the container stops and allocated when the container
1082
+ # starts. The allocated port might be changed when restarting the container.
1083
+ #
1084
+ # The port is selected from the ephemeral port range that depends on the kernel.
1085
+ # For example, on Linux the range is defined by
1086
+ # `/proc/sys/net/ipv4/ip_local_port_range`.
1087
+ sig { returns(T.nilable(T::Boolean)) }
1088
+ attr_reader :publish_all_ports
1089
+
1090
+ sig { params(publish_all_ports: T::Boolean).void }
1091
+ attr_writer :publish_all_ports
1092
+
1093
+ # The list of paths to be set as read-only inside the container (this overrides
1094
+ # the default set of paths).
1095
+ sig { returns(T.nilable(T::Array[String])) }
1096
+ attr_reader :readonly_paths
1097
+
1098
+ sig { params(readonly_paths: T::Array[String]).void }
1099
+ attr_writer :readonly_paths
1100
+
1101
+ # Mount the container's root filesystem as read only.
1102
+ sig { returns(T.nilable(T::Boolean)) }
1103
+ attr_reader :readonly_rootfs
1104
+
1105
+ sig { params(readonly_rootfs: T::Boolean).void }
1106
+ attr_writer :readonly_rootfs
1107
+
1108
+ # The behavior to apply when the container exits. The default is not to restart.
1109
+ #
1110
+ # An ever increasing delay (double the previous delay, starting at 100ms) is added
1111
+ # before each restart to prevent flooding the server.
1112
+ sig do
1113
+ returns(
1114
+ T.nilable(DockerEngineAPI::Container::HostConfig::RestartPolicy)
1115
+ )
1116
+ end
1117
+ attr_reader :restart_policy
1118
+
1119
+ sig do
1120
+ params(
1121
+ restart_policy:
1122
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::OrHash
1123
+ ).void
1124
+ end
1125
+ attr_writer :restart_policy
1126
+
1127
+ # Runtime to use with this container.
1128
+ sig { returns(T.nilable(String)) }
1129
+ attr_accessor :runtime
1130
+
1131
+ # A list of string values to customize labels for MLS systems, such as SELinux.
1132
+ sig { returns(T.nilable(T::Array[String])) }
1133
+ attr_reader :security_opt
1134
+
1135
+ sig { params(security_opt: T::Array[String]).void }
1136
+ attr_writer :security_opt
1137
+
1138
+ # Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
1139
+ sig { returns(T.nilable(Integer)) }
1140
+ attr_reader :shm_size
1141
+
1142
+ sig { params(shm_size: Integer).void }
1143
+ attr_writer :shm_size
1144
+
1145
+ # Storage driver options for this container, in the form `{"size": "120G"}`.
1146
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1147
+ attr_reader :storage_opt
1148
+
1149
+ sig { params(storage_opt: T::Hash[Symbol, String]).void }
1150
+ attr_writer :storage_opt
1151
+
1152
+ # A list of kernel parameters (sysctls) to set in the container.
1153
+ #
1154
+ # This field is omitted if not set.
1155
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1156
+ attr_accessor :sysctls
1157
+
1158
+ # A map of container directories which should be replaced by tmpfs mounts, and
1159
+ # their corresponding mount options. For example:
1160
+ #
1161
+ # ```
1162
+ # { "/run": "rw,noexec,nosuid,size=65536k" }
1163
+ # ```
1164
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1165
+ attr_reader :tmpfs
1166
+
1167
+ sig { params(tmpfs: T::Hash[Symbol, String]).void }
1168
+ attr_writer :tmpfs
1169
+
1170
+ # A list of resource limits to set in the container. For example:
1171
+ #
1172
+ # ```
1173
+ # {"Name": "nofile", "Soft": 1024, "Hard": 2048}
1174
+ # ```
1175
+ sig do
1176
+ returns(
1177
+ T.nilable(T::Array[DockerEngineAPI::Container::HostConfig::Ulimit])
1178
+ )
1179
+ end
1180
+ attr_reader :ulimits
1181
+
1182
+ sig do
1183
+ params(
1184
+ ulimits:
1185
+ T::Array[DockerEngineAPI::Container::HostConfig::Ulimit::OrHash]
1186
+ ).void
1187
+ end
1188
+ attr_writer :ulimits
1189
+
1190
+ # Sets the usernamespace mode for the container when usernamespace remapping
1191
+ # option is enabled.
1192
+ sig { returns(T.nilable(String)) }
1193
+ attr_reader :userns_mode
1194
+
1195
+ sig { params(userns_mode: String).void }
1196
+ attr_writer :userns_mode
1197
+
1198
+ # UTS namespace to use for the container.
1199
+ sig { returns(T.nilable(String)) }
1200
+ attr_reader :uts_mode
1201
+
1202
+ sig { params(uts_mode: String).void }
1203
+ attr_writer :uts_mode
1204
+
1205
+ # Driver that this container uses to mount volumes.
1206
+ sig { returns(T.nilable(String)) }
1207
+ attr_reader :volume_driver
1208
+
1209
+ sig { params(volume_driver: String).void }
1210
+ attr_writer :volume_driver
1211
+
1212
+ # A list of volumes to inherit from another container, specified in the form
1213
+ # `<container name>[:<ro|rw>]`.
1214
+ sig { returns(T.nilable(T::Array[String])) }
1215
+ attr_reader :volumes_from
1216
+
1217
+ sig { params(volumes_from: T::Array[String]).void }
1218
+ attr_writer :volumes_from
1219
+
1220
+ # Container configuration that depends on the host we are running on
1221
+ sig do
1222
+ params(
1223
+ annotations: T::Hash[Symbol, String],
1224
+ auto_remove: T::Boolean,
1225
+ binds: T::Array[String],
1226
+ blkio_device_read_bps:
1227
+ T::Array[
1228
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadBp::OrHash
1229
+ ],
1230
+ blkio_device_read_i_ops:
1231
+ T::Array[
1232
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadIOp::OrHash
1233
+ ],
1234
+ blkio_device_write_bps:
1235
+ T::Array[
1236
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteBp::OrHash
1237
+ ],
1238
+ blkio_device_write_i_ops:
1239
+ T::Array[
1240
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteIOp::OrHash
1241
+ ],
1242
+ blkio_weight: Integer,
1243
+ blkio_weight_device:
1244
+ T::Array[
1245
+ DockerEngineAPI::Container::HostConfig::BlkioWeightDevice::OrHash
1246
+ ],
1247
+ cap_add: T::Array[String],
1248
+ cap_drop: T::Array[String],
1249
+ cgroup: String,
1250
+ cgroupns_mode:
1251
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::OrSymbol,
1252
+ cgroup_parent: String,
1253
+ console_size: T.nilable(T::Array[Integer]),
1254
+ container_id_file: String,
1255
+ cpu_count: Integer,
1256
+ cpu_percent: Integer,
1257
+ cpu_period: Integer,
1258
+ cpu_quota: Integer,
1259
+ cpu_realtime_period: Integer,
1260
+ cpu_realtime_runtime: Integer,
1261
+ cpuset_cpus: String,
1262
+ cpuset_mems: String,
1263
+ cpu_shares: Integer,
1264
+ device_cgroup_rules: T::Array[String],
1265
+ device_requests:
1266
+ T::Array[
1267
+ DockerEngineAPI::Container::HostConfig::DeviceRequest::OrHash
1268
+ ],
1269
+ devices:
1270
+ T::Array[DockerEngineAPI::Container::HostConfig::Device::OrHash],
1271
+ dns: T::Array[String],
1272
+ dns_options: T::Array[String],
1273
+ dns_search: T::Array[String],
1274
+ extra_hosts: T::Array[String],
1275
+ group_add: T::Array[String],
1276
+ init: T.nilable(T::Boolean),
1277
+ io_maximum_bandwidth: Integer,
1278
+ io_maximum_i_ops: Integer,
1279
+ ipc_mode: String,
1280
+ isolation:
1281
+ DockerEngineAPI::Container::HostConfig::Isolation::OrSymbol,
1282
+ links: T::Array[String],
1283
+ log_config:
1284
+ DockerEngineAPI::Container::HostConfig::LogConfig::OrHash,
1285
+ masked_paths: T::Array[String],
1286
+ memory: Integer,
1287
+ memory_reservation: Integer,
1288
+ memory_swap: Integer,
1289
+ memory_swappiness: Integer,
1290
+ mounts:
1291
+ T::Array[DockerEngineAPI::Container::HostConfig::Mount::OrHash],
1292
+ nano_cpus: Integer,
1293
+ network_mode: String,
1294
+ oom_kill_disable: T::Boolean,
1295
+ oom_score_adj: Integer,
1296
+ pid_mode: String,
1297
+ pids_limit: T.nilable(Integer),
1298
+ port_bindings:
1299
+ T::Hash[
1300
+ Symbol,
1301
+ T::Array[
1302
+ DockerEngineAPI::Container::HostConfig::PortBinding::OrHash
1303
+ ]
1304
+ ],
1305
+ privileged: T::Boolean,
1306
+ publish_all_ports: T::Boolean,
1307
+ readonly_paths: T::Array[String],
1308
+ readonly_rootfs: T::Boolean,
1309
+ restart_policy:
1310
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::OrHash,
1311
+ runtime: T.nilable(String),
1312
+ security_opt: T::Array[String],
1313
+ shm_size: Integer,
1314
+ storage_opt: T::Hash[Symbol, String],
1315
+ sysctls: T.nilable(T::Hash[Symbol, String]),
1316
+ tmpfs: T::Hash[Symbol, String],
1317
+ ulimits:
1318
+ T::Array[DockerEngineAPI::Container::HostConfig::Ulimit::OrHash],
1319
+ userns_mode: String,
1320
+ uts_mode: String,
1321
+ volume_driver: String,
1322
+ volumes_from: T::Array[String]
1323
+ ).returns(T.attached_class)
1324
+ end
1325
+ def self.new(
1326
+ # Arbitrary non-identifying metadata attached to container and provided to the
1327
+ # runtime when the container is started.
1328
+ annotations: nil,
1329
+ # Automatically remove the container when the container's process exits. This has
1330
+ # no effect if `RestartPolicy` is set.
1331
+ auto_remove: nil,
1332
+ # A list of volume bindings for this container. Each volume binding is a string in
1333
+ # one of these forms:
1334
+ #
1335
+ # - `host-src:container-dest[:options]` to bind-mount a host path into the
1336
+ # container. Both `host-src`, and `container-dest` must be an _absolute_ path.
1337
+ # - `volume-name:container-dest[:options]` to bind-mount a volume managed by a
1338
+ # volume driver into the container. `container-dest` must be an _absolute_ path.
1339
+ #
1340
+ # `options` is an optional, comma-delimited list of:
1341
+ #
1342
+ # - `nocopy` disables automatic copying of data from the container path to the
1343
+ # volume. The `nocopy` flag only applies to named volumes.
1344
+ # - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or
1345
+ # set to `rw`, volumes are mounted read-write.
1346
+ # - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read
1347
+ # and write to the same volume.
1348
+ # - `z`: a _shared_ content label is applied to the content. This label
1349
+ # indicates that multiple containers can share the volume content, for both
1350
+ # reading and writing.
1351
+ # - `Z`: a _private unshared_ label is applied to the content. This label
1352
+ # indicates that only the current container can use a private volume. Labeling
1353
+ # systems such as SELinux require proper labels to be placed on volume content
1354
+ # that is mounted into a container. Without a label, the security system can
1355
+ # prevent a container's processes from using the content. By default, the
1356
+ # labels set by the host operating system are not modified.
1357
+ # - `[[r]shared|[r]slave|[r]private]` specifies mount
1358
+ # [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
1359
+ # This only applies to bind-mounted volumes, not internal volumes or named
1360
+ # volumes. Mount propagation requires the source mount point (the location where
1361
+ # the source directory is mounted in the host operating system) to have the
1362
+ # correct propagation properties. For shared volumes, the source mount point
1363
+ # must be set to `shared`. For slave volumes, the mount must be set to either
1364
+ # `shared` or `slave`.
1365
+ binds: nil,
1366
+ # Limit read rate (bytes per second) from a device, in the form:
1367
+ #
1368
+ # ```
1369
+ # [{"Path": "device_path", "Rate": rate}]
1370
+ # ```
1371
+ blkio_device_read_bps: nil,
1372
+ # Limit read rate (IO per second) from a device, in the form:
1373
+ #
1374
+ # ```
1375
+ # [{"Path": "device_path", "Rate": rate}]
1376
+ # ```
1377
+ blkio_device_read_i_ops: nil,
1378
+ # Limit write rate (bytes per second) to a device, in the form:
1379
+ #
1380
+ # ```
1381
+ # [{"Path": "device_path", "Rate": rate}]
1382
+ # ```
1383
+ blkio_device_write_bps: nil,
1384
+ # Limit write rate (IO per second) to a device, in the form:
1385
+ #
1386
+ # ```
1387
+ # [{"Path": "device_path", "Rate": rate}]
1388
+ # ```
1389
+ blkio_device_write_i_ops: nil,
1390
+ # Block IO weight (relative weight).
1391
+ blkio_weight: nil,
1392
+ # Block IO weight (relative device weight) in the form:
1393
+ #
1394
+ # ```
1395
+ # [{"Path": "device_path", "Weight": weight}]
1396
+ # ```
1397
+ blkio_weight_device: nil,
1398
+ # A list of kernel capabilities to add to the container. Conflicts with option
1399
+ # 'Capabilities'.
1400
+ cap_add: nil,
1401
+ # A list of kernel capabilities to drop from the container. Conflicts with option
1402
+ # 'Capabilities'.
1403
+ cap_drop: nil,
1404
+ # Cgroup to use for the container.
1405
+ cgroup: nil,
1406
+ # cgroup namespace mode for the container. Possible values are:
1407
+ #
1408
+ # - `"private"`: the container runs in its own private cgroup namespace
1409
+ # - `"host"`: use the host system's cgroup namespace
1410
+ #
1411
+ # If not specified, the daemon default is used, which can either be `"private"` or
1412
+ # `"host"`, depending on daemon version, kernel support and configuration.
1413
+ cgroupns_mode: nil,
1414
+ # Path to `cgroups` under which the container's `cgroup` is created. If the path
1415
+ # is not absolute, the path is considered to be relative to the `cgroups` path of
1416
+ # the init process. Cgroups are created if they do not already exist.
1417
+ cgroup_parent: nil,
1418
+ # Initial console size, as an `[height, width]` array.
1419
+ console_size: nil,
1420
+ # Path to a file where the container ID is written
1421
+ container_id_file: nil,
1422
+ # The number of usable CPUs (Windows only).
1423
+ #
1424
+ # On Windows Server containers, the processor resource controls are mutually
1425
+ # exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
1426
+ # `CPUPercent` last.
1427
+ cpu_count: nil,
1428
+ # The usable percentage of the available CPUs (Windows only).
1429
+ #
1430
+ # On Windows Server containers, the processor resource controls are mutually
1431
+ # exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
1432
+ # `CPUPercent` last.
1433
+ cpu_percent: nil,
1434
+ # The length of a CPU period in microseconds.
1435
+ cpu_period: nil,
1436
+ # Microseconds of CPU time that the container can get in a CPU period.
1437
+ cpu_quota: nil,
1438
+ # The length of a CPU real-time period in microseconds. Set to 0 to allocate no
1439
+ # time allocated to real-time tasks.
1440
+ cpu_realtime_period: nil,
1441
+ # The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no
1442
+ # time allocated to real-time tasks.
1443
+ cpu_realtime_runtime: nil,
1444
+ # CPUs in which to allow execution (e.g., `0-3`, `0,1`).
1445
+ cpuset_cpus: nil,
1446
+ # Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
1447
+ # NUMA systems.
1448
+ cpuset_mems: nil,
1449
+ # An integer value representing this container's relative CPU weight versus other
1450
+ # containers.
1451
+ cpu_shares: nil,
1452
+ # a list of cgroup rules to apply to the container
1453
+ device_cgroup_rules: nil,
1454
+ # A list of requests for devices to be sent to device drivers.
1455
+ device_requests: nil,
1456
+ # A list of devices to add to the container.
1457
+ devices: nil,
1458
+ # A list of DNS servers for the container to use.
1459
+ dns: nil,
1460
+ # A list of DNS options.
1461
+ dns_options: nil,
1462
+ # A list of DNS search domains.
1463
+ dns_search: nil,
1464
+ # A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
1465
+ # Specified in the form `["hostname:IP"]`.
1466
+ extra_hosts: nil,
1467
+ # A list of additional groups that the container process will run as.
1468
+ group_add: nil,
1469
+ # Run an init inside the container that forwards signals and reaps processes. This
1470
+ # field is omitted if empty, and the default (as configured on the daemon) is
1471
+ # used.
1472
+ init: nil,
1473
+ # Maximum IO in bytes per second for the container system drive (Windows only).
1474
+ io_maximum_bandwidth: nil,
1475
+ # Maximum IOps for the container system drive (Windows only)
1476
+ io_maximum_i_ops: nil,
1477
+ # IPC sharing mode for the container. Possible values are:
1478
+ #
1479
+ # - `"none"`: own private IPC namespace, with /dev/shm not mounted
1480
+ # - `"private"`: own private IPC namespace
1481
+ # - `"shareable"`: own private IPC namespace, with a possibility to share it with
1482
+ # other containers
1483
+ # - `"container:<name|id>"`: join another (shareable) container's IPC namespace
1484
+ # - `"host"`: use the host system's IPC namespace
1485
+ #
1486
+ # If not specified, daemon default is used, which can either be `"private"` or
1487
+ # `"shareable"`, depending on daemon version and configuration.
1488
+ ipc_mode: nil,
1489
+ # Isolation technology of the container. (Windows only)
1490
+ isolation: nil,
1491
+ # A list of links for the container in the form `container_name:alias`.
1492
+ links: nil,
1493
+ # The logging configuration for this container
1494
+ log_config: nil,
1495
+ # The list of paths to be masked inside the container (this overrides the default
1496
+ # set of paths).
1497
+ masked_paths: nil,
1498
+ # Memory limit in bytes.
1499
+ memory: nil,
1500
+ # Memory soft limit in bytes.
1501
+ memory_reservation: nil,
1502
+ # Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.
1503
+ memory_swap: nil,
1504
+ # Tune a container's memory swappiness behavior. Accepts an integer between 0
1505
+ # and 100.
1506
+ memory_swappiness: nil,
1507
+ # Specification for mounts to be added to the container.
1508
+ mounts: nil,
1509
+ # CPU quota in units of 10<sup>-9</sup> CPUs.
1510
+ nano_cpus: nil,
1511
+ # Network mode to use for this container. Supported standard values are: `bridge`,
1512
+ # `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom
1513
+ # network's name to which this container should connect to.
1514
+ network_mode: nil,
1515
+ # Disable OOM Killer for the container.
1516
+ oom_kill_disable: nil,
1517
+ # An integer value containing the score given to the container in order to tune
1518
+ # OOM killer preferences.
1519
+ oom_score_adj: nil,
1520
+ # Set the PID (Process) Namespace mode for the container. It can be either:
1521
+ #
1522
+ # - `"container:<name|id>"`: joins another container's PID namespace
1523
+ # - `"host"`: use the host's PID namespace inside the container
1524
+ pid_mode: nil,
1525
+ # Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not
1526
+ # change.
1527
+ pids_limit: nil,
1528
+ # PortMap describes the mapping of container ports to host ports, using the
1529
+ # container's port-number and protocol as key in the format `<port>/<protocol>`,
1530
+ # for example, `80/udp`.
1531
+ #
1532
+ # If a container's port is mapped for multiple protocols, separate entries are
1533
+ # added to the mapping table.
1534
+ port_bindings: nil,
1535
+ # Gives the container full access to the host.
1536
+ privileged: nil,
1537
+ # Allocates an ephemeral host port for all of a container's exposed ports.
1538
+ #
1539
+ # Ports are de-allocated when the container stops and allocated when the container
1540
+ # starts. The allocated port might be changed when restarting the container.
1541
+ #
1542
+ # The port is selected from the ephemeral port range that depends on the kernel.
1543
+ # For example, on Linux the range is defined by
1544
+ # `/proc/sys/net/ipv4/ip_local_port_range`.
1545
+ publish_all_ports: nil,
1546
+ # The list of paths to be set as read-only inside the container (this overrides
1547
+ # the default set of paths).
1548
+ readonly_paths: nil,
1549
+ # Mount the container's root filesystem as read only.
1550
+ readonly_rootfs: nil,
1551
+ # The behavior to apply when the container exits. The default is not to restart.
1552
+ #
1553
+ # An ever increasing delay (double the previous delay, starting at 100ms) is added
1554
+ # before each restart to prevent flooding the server.
1555
+ restart_policy: nil,
1556
+ # Runtime to use with this container.
1557
+ runtime: nil,
1558
+ # A list of string values to customize labels for MLS systems, such as SELinux.
1559
+ security_opt: nil,
1560
+ # Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
1561
+ shm_size: nil,
1562
+ # Storage driver options for this container, in the form `{"size": "120G"}`.
1563
+ storage_opt: nil,
1564
+ # A list of kernel parameters (sysctls) to set in the container.
1565
+ #
1566
+ # This field is omitted if not set.
1567
+ sysctls: nil,
1568
+ # A map of container directories which should be replaced by tmpfs mounts, and
1569
+ # their corresponding mount options. For example:
1570
+ #
1571
+ # ```
1572
+ # { "/run": "rw,noexec,nosuid,size=65536k" }
1573
+ # ```
1574
+ tmpfs: nil,
1575
+ # A list of resource limits to set in the container. For example:
1576
+ #
1577
+ # ```
1578
+ # {"Name": "nofile", "Soft": 1024, "Hard": 2048}
1579
+ # ```
1580
+ ulimits: nil,
1581
+ # Sets the usernamespace mode for the container when usernamespace remapping
1582
+ # option is enabled.
1583
+ userns_mode: nil,
1584
+ # UTS namespace to use for the container.
1585
+ uts_mode: nil,
1586
+ # Driver that this container uses to mount volumes.
1587
+ volume_driver: nil,
1588
+ # A list of volumes to inherit from another container, specified in the form
1589
+ # `<container name>[:<ro|rw>]`.
1590
+ volumes_from: nil
1591
+ )
1592
+ end
1593
+
1594
+ sig do
1595
+ override.returns(
1596
+ {
1597
+ annotations: T::Hash[Symbol, String],
1598
+ auto_remove: T::Boolean,
1599
+ binds: T::Array[String],
1600
+ blkio_device_read_bps:
1601
+ T::Array[
1602
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadBp
1603
+ ],
1604
+ blkio_device_read_i_ops:
1605
+ T::Array[
1606
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadIOp
1607
+ ],
1608
+ blkio_device_write_bps:
1609
+ T::Array[
1610
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteBp
1611
+ ],
1612
+ blkio_device_write_i_ops:
1613
+ T::Array[
1614
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteIOp
1615
+ ],
1616
+ blkio_weight: Integer,
1617
+ blkio_weight_device:
1618
+ T::Array[
1619
+ DockerEngineAPI::Container::HostConfig::BlkioWeightDevice
1620
+ ],
1621
+ cap_add: T::Array[String],
1622
+ cap_drop: T::Array[String],
1623
+ cgroup: String,
1624
+ cgroupns_mode:
1625
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::TaggedSymbol,
1626
+ cgroup_parent: String,
1627
+ console_size: T.nilable(T::Array[Integer]),
1628
+ container_id_file: String,
1629
+ cpu_count: Integer,
1630
+ cpu_percent: Integer,
1631
+ cpu_period: Integer,
1632
+ cpu_quota: Integer,
1633
+ cpu_realtime_period: Integer,
1634
+ cpu_realtime_runtime: Integer,
1635
+ cpuset_cpus: String,
1636
+ cpuset_mems: String,
1637
+ cpu_shares: Integer,
1638
+ device_cgroup_rules: T::Array[String],
1639
+ device_requests:
1640
+ T::Array[DockerEngineAPI::Container::HostConfig::DeviceRequest],
1641
+ devices: T::Array[DockerEngineAPI::Container::HostConfig::Device],
1642
+ dns: T::Array[String],
1643
+ dns_options: T::Array[String],
1644
+ dns_search: T::Array[String],
1645
+ extra_hosts: T::Array[String],
1646
+ group_add: T::Array[String],
1647
+ init: T.nilable(T::Boolean),
1648
+ io_maximum_bandwidth: Integer,
1649
+ io_maximum_i_ops: Integer,
1650
+ ipc_mode: String,
1651
+ isolation:
1652
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol,
1653
+ links: T::Array[String],
1654
+ log_config: DockerEngineAPI::Container::HostConfig::LogConfig,
1655
+ masked_paths: T::Array[String],
1656
+ memory: Integer,
1657
+ memory_reservation: Integer,
1658
+ memory_swap: Integer,
1659
+ memory_swappiness: Integer,
1660
+ mounts: T::Array[DockerEngineAPI::Container::HostConfig::Mount],
1661
+ nano_cpus: Integer,
1662
+ network_mode: String,
1663
+ oom_kill_disable: T::Boolean,
1664
+ oom_score_adj: Integer,
1665
+ pid_mode: String,
1666
+ pids_limit: T.nilable(Integer),
1667
+ port_bindings:
1668
+ T::Hash[
1669
+ Symbol,
1670
+ T::Array[DockerEngineAPI::Container::HostConfig::PortBinding]
1671
+ ],
1672
+ privileged: T::Boolean,
1673
+ publish_all_ports: T::Boolean,
1674
+ readonly_paths: T::Array[String],
1675
+ readonly_rootfs: T::Boolean,
1676
+ restart_policy:
1677
+ DockerEngineAPI::Container::HostConfig::RestartPolicy,
1678
+ runtime: T.nilable(String),
1679
+ security_opt: T::Array[String],
1680
+ shm_size: Integer,
1681
+ storage_opt: T::Hash[Symbol, String],
1682
+ sysctls: T.nilable(T::Hash[Symbol, String]),
1683
+ tmpfs: T::Hash[Symbol, String],
1684
+ ulimits: T::Array[DockerEngineAPI::Container::HostConfig::Ulimit],
1685
+ userns_mode: String,
1686
+ uts_mode: String,
1687
+ volume_driver: String,
1688
+ volumes_from: T::Array[String]
1689
+ }
1690
+ )
1691
+ end
1692
+ def to_hash
1693
+ end
1694
+
1695
+ class BlkioDeviceReadBp < DockerEngineAPI::Internal::Type::BaseModel
1696
+ OrHash =
1697
+ T.type_alias do
1698
+ T.any(
1699
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadBp,
1700
+ DockerEngineAPI::Internal::AnyHash
1701
+ )
1702
+ end
1703
+
1704
+ # Device path
1705
+ sig { returns(T.nilable(String)) }
1706
+ attr_reader :path
1707
+
1708
+ sig { params(path: String).void }
1709
+ attr_writer :path
1710
+
1711
+ # Rate
1712
+ sig { returns(T.nilable(Integer)) }
1713
+ attr_reader :rate
1714
+
1715
+ sig { params(rate: Integer).void }
1716
+ attr_writer :rate
1717
+
1718
+ sig { params(path: String, rate: Integer).returns(T.attached_class) }
1719
+ def self.new(
1720
+ # Device path
1721
+ path: nil,
1722
+ # Rate
1723
+ rate: nil
1724
+ )
1725
+ end
1726
+
1727
+ sig { override.returns({ path: String, rate: Integer }) }
1728
+ def to_hash
1729
+ end
1730
+ end
1731
+
1732
+ class BlkioDeviceReadIOp < DockerEngineAPI::Internal::Type::BaseModel
1733
+ OrHash =
1734
+ T.type_alias do
1735
+ T.any(
1736
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceReadIOp,
1737
+ DockerEngineAPI::Internal::AnyHash
1738
+ )
1739
+ end
1740
+
1741
+ # Device path
1742
+ sig { returns(T.nilable(String)) }
1743
+ attr_reader :path
1744
+
1745
+ sig { params(path: String).void }
1746
+ attr_writer :path
1747
+
1748
+ # Rate
1749
+ sig { returns(T.nilable(Integer)) }
1750
+ attr_reader :rate
1751
+
1752
+ sig { params(rate: Integer).void }
1753
+ attr_writer :rate
1754
+
1755
+ sig { params(path: String, rate: Integer).returns(T.attached_class) }
1756
+ def self.new(
1757
+ # Device path
1758
+ path: nil,
1759
+ # Rate
1760
+ rate: nil
1761
+ )
1762
+ end
1763
+
1764
+ sig { override.returns({ path: String, rate: Integer }) }
1765
+ def to_hash
1766
+ end
1767
+ end
1768
+
1769
+ class BlkioDeviceWriteBp < DockerEngineAPI::Internal::Type::BaseModel
1770
+ OrHash =
1771
+ T.type_alias do
1772
+ T.any(
1773
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteBp,
1774
+ DockerEngineAPI::Internal::AnyHash
1775
+ )
1776
+ end
1777
+
1778
+ # Device path
1779
+ sig { returns(T.nilable(String)) }
1780
+ attr_reader :path
1781
+
1782
+ sig { params(path: String).void }
1783
+ attr_writer :path
1784
+
1785
+ # Rate
1786
+ sig { returns(T.nilable(Integer)) }
1787
+ attr_reader :rate
1788
+
1789
+ sig { params(rate: Integer).void }
1790
+ attr_writer :rate
1791
+
1792
+ sig { params(path: String, rate: Integer).returns(T.attached_class) }
1793
+ def self.new(
1794
+ # Device path
1795
+ path: nil,
1796
+ # Rate
1797
+ rate: nil
1798
+ )
1799
+ end
1800
+
1801
+ sig { override.returns({ path: String, rate: Integer }) }
1802
+ def to_hash
1803
+ end
1804
+ end
1805
+
1806
+ class BlkioDeviceWriteIOp < DockerEngineAPI::Internal::Type::BaseModel
1807
+ OrHash =
1808
+ T.type_alias do
1809
+ T.any(
1810
+ DockerEngineAPI::Container::HostConfig::BlkioDeviceWriteIOp,
1811
+ DockerEngineAPI::Internal::AnyHash
1812
+ )
1813
+ end
1814
+
1815
+ # Device path
1816
+ sig { returns(T.nilable(String)) }
1817
+ attr_reader :path
1818
+
1819
+ sig { params(path: String).void }
1820
+ attr_writer :path
1821
+
1822
+ # Rate
1823
+ sig { returns(T.nilable(Integer)) }
1824
+ attr_reader :rate
1825
+
1826
+ sig { params(rate: Integer).void }
1827
+ attr_writer :rate
1828
+
1829
+ sig { params(path: String, rate: Integer).returns(T.attached_class) }
1830
+ def self.new(
1831
+ # Device path
1832
+ path: nil,
1833
+ # Rate
1834
+ rate: nil
1835
+ )
1836
+ end
1837
+
1838
+ sig { override.returns({ path: String, rate: Integer }) }
1839
+ def to_hash
1840
+ end
1841
+ end
1842
+
1843
+ class BlkioWeightDevice < DockerEngineAPI::Internal::Type::BaseModel
1844
+ OrHash =
1845
+ T.type_alias do
1846
+ T.any(
1847
+ DockerEngineAPI::Container::HostConfig::BlkioWeightDevice,
1848
+ DockerEngineAPI::Internal::AnyHash
1849
+ )
1850
+ end
1851
+
1852
+ sig { returns(T.nilable(String)) }
1853
+ attr_reader :path
1854
+
1855
+ sig { params(path: String).void }
1856
+ attr_writer :path
1857
+
1858
+ sig { returns(T.nilable(Integer)) }
1859
+ attr_reader :weight
1860
+
1861
+ sig { params(weight: Integer).void }
1862
+ attr_writer :weight
1863
+
1864
+ sig do
1865
+ params(path: String, weight: Integer).returns(T.attached_class)
1866
+ end
1867
+ def self.new(path: nil, weight: nil)
1868
+ end
1869
+
1870
+ sig { override.returns({ path: String, weight: Integer }) }
1871
+ def to_hash
1872
+ end
1873
+ end
1874
+
1875
+ # cgroup namespace mode for the container. Possible values are:
1876
+ #
1877
+ # - `"private"`: the container runs in its own private cgroup namespace
1878
+ # - `"host"`: use the host system's cgroup namespace
1879
+ #
1880
+ # If not specified, the daemon default is used, which can either be `"private"` or
1881
+ # `"host"`, depending on daemon version, kernel support and configuration.
1882
+ module CgroupnsMode
1883
+ extend DockerEngineAPI::Internal::Type::Enum
1884
+
1885
+ TaggedSymbol =
1886
+ T.type_alias do
1887
+ T.all(
1888
+ Symbol,
1889
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode
1890
+ )
1891
+ end
1892
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1893
+
1894
+ PRIVATE =
1895
+ T.let(
1896
+ :private,
1897
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::TaggedSymbol
1898
+ )
1899
+ HOST =
1900
+ T.let(
1901
+ :host,
1902
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::TaggedSymbol
1903
+ )
1904
+
1905
+ sig do
1906
+ override.returns(
1907
+ T::Array[
1908
+ DockerEngineAPI::Container::HostConfig::CgroupnsMode::TaggedSymbol
1909
+ ]
1910
+ )
1911
+ end
1912
+ def self.values
1913
+ end
1914
+ end
1915
+
1916
+ class DeviceRequest < DockerEngineAPI::Internal::Type::BaseModel
1917
+ OrHash =
1918
+ T.type_alias do
1919
+ T.any(
1920
+ DockerEngineAPI::Container::HostConfig::DeviceRequest,
1921
+ DockerEngineAPI::Internal::AnyHash
1922
+ )
1923
+ end
1924
+
1925
+ # A list of capabilities; an OR list of AND lists of capabilities.
1926
+ #
1927
+ # Note that if a driver is specified the capabilities have no effect on selecting
1928
+ # a driver as the driver name is used directly.
1929
+ #
1930
+ # Note that if no driver is specified the capabilities are used to select a driver
1931
+ # with the required capabilities.
1932
+ sig { returns(T.nilable(T::Array[T::Array[String]])) }
1933
+ attr_reader :capabilities
1934
+
1935
+ sig { params(capabilities: T::Array[T::Array[String]]).void }
1936
+ attr_writer :capabilities
1937
+
1938
+ sig { returns(T.nilable(Integer)) }
1939
+ attr_reader :count
1940
+
1941
+ sig { params(count: Integer).void }
1942
+ attr_writer :count
1943
+
1944
+ sig { returns(T.nilable(T::Array[String])) }
1945
+ attr_reader :device_ids
1946
+
1947
+ sig { params(device_ids: T::Array[String]).void }
1948
+ attr_writer :device_ids
1949
+
1950
+ # The name of the device driver to use for this request.
1951
+ #
1952
+ # Note that if this is specified the capabilities are ignored when selecting a
1953
+ # device driver.
1954
+ sig { returns(T.nilable(String)) }
1955
+ attr_reader :driver
1956
+
1957
+ sig { params(driver: String).void }
1958
+ attr_writer :driver
1959
+
1960
+ # Driver-specific options, specified as a key/value pairs. These options are
1961
+ # passed directly to the driver.
1962
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
1963
+ attr_reader :options
1964
+
1965
+ sig { params(options: T::Hash[Symbol, String]).void }
1966
+ attr_writer :options
1967
+
1968
+ # A request for devices to be sent to device drivers
1969
+ sig do
1970
+ params(
1971
+ capabilities: T::Array[T::Array[String]],
1972
+ count: Integer,
1973
+ device_ids: T::Array[String],
1974
+ driver: String,
1975
+ options: T::Hash[Symbol, String]
1976
+ ).returns(T.attached_class)
1977
+ end
1978
+ def self.new(
1979
+ # A list of capabilities; an OR list of AND lists of capabilities.
1980
+ #
1981
+ # Note that if a driver is specified the capabilities have no effect on selecting
1982
+ # a driver as the driver name is used directly.
1983
+ #
1984
+ # Note that if no driver is specified the capabilities are used to select a driver
1985
+ # with the required capabilities.
1986
+ capabilities: nil,
1987
+ count: nil,
1988
+ device_ids: nil,
1989
+ # The name of the device driver to use for this request.
1990
+ #
1991
+ # Note that if this is specified the capabilities are ignored when selecting a
1992
+ # device driver.
1993
+ driver: nil,
1994
+ # Driver-specific options, specified as a key/value pairs. These options are
1995
+ # passed directly to the driver.
1996
+ options: nil
1997
+ )
1998
+ end
1999
+
2000
+ sig do
2001
+ override.returns(
2002
+ {
2003
+ capabilities: T::Array[T::Array[String]],
2004
+ count: Integer,
2005
+ device_ids: T::Array[String],
2006
+ driver: String,
2007
+ options: T::Hash[Symbol, String]
2008
+ }
2009
+ )
2010
+ end
2011
+ def to_hash
2012
+ end
2013
+ end
2014
+
2015
+ class Device < DockerEngineAPI::Internal::Type::BaseModel
2016
+ OrHash =
2017
+ T.type_alias do
2018
+ T.any(
2019
+ DockerEngineAPI::Container::HostConfig::Device,
2020
+ DockerEngineAPI::Internal::AnyHash
2021
+ )
2022
+ end
2023
+
2024
+ sig { returns(T.nilable(String)) }
2025
+ attr_reader :cgroup_permissions
2026
+
2027
+ sig { params(cgroup_permissions: String).void }
2028
+ attr_writer :cgroup_permissions
2029
+
2030
+ sig { returns(T.nilable(String)) }
2031
+ attr_reader :path_in_container
2032
+
2033
+ sig { params(path_in_container: String).void }
2034
+ attr_writer :path_in_container
2035
+
2036
+ sig { returns(T.nilable(String)) }
2037
+ attr_reader :path_on_host
2038
+
2039
+ sig { params(path_on_host: String).void }
2040
+ attr_writer :path_on_host
2041
+
2042
+ # A device mapping between the host and container
2043
+ sig do
2044
+ params(
2045
+ cgroup_permissions: String,
2046
+ path_in_container: String,
2047
+ path_on_host: String
2048
+ ).returns(T.attached_class)
2049
+ end
2050
+ def self.new(
2051
+ cgroup_permissions: nil,
2052
+ path_in_container: nil,
2053
+ path_on_host: nil
2054
+ )
2055
+ end
2056
+
2057
+ sig do
2058
+ override.returns(
2059
+ {
2060
+ cgroup_permissions: String,
2061
+ path_in_container: String,
2062
+ path_on_host: String
2063
+ }
2064
+ )
2065
+ end
2066
+ def to_hash
2067
+ end
2068
+ end
2069
+
2070
+ # Isolation technology of the container. (Windows only)
2071
+ module Isolation
2072
+ extend DockerEngineAPI::Internal::Type::Enum
2073
+
2074
+ TaggedSymbol =
2075
+ T.type_alias do
2076
+ T.all(Symbol, DockerEngineAPI::Container::HostConfig::Isolation)
2077
+ end
2078
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2079
+
2080
+ DEFAULT =
2081
+ T.let(
2082
+ :default,
2083
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol
2084
+ )
2085
+ PROCESS =
2086
+ T.let(
2087
+ :process,
2088
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol
2089
+ )
2090
+ HYPERV =
2091
+ T.let(
2092
+ :hyperv,
2093
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol
2094
+ )
2095
+ EMPTY =
2096
+ T.let(
2097
+ :"",
2098
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol
2099
+ )
2100
+
2101
+ sig do
2102
+ override.returns(
2103
+ T::Array[
2104
+ DockerEngineAPI::Container::HostConfig::Isolation::TaggedSymbol
2105
+ ]
2106
+ )
2107
+ end
2108
+ def self.values
2109
+ end
2110
+ end
2111
+
2112
+ class LogConfig < DockerEngineAPI::Internal::Type::BaseModel
2113
+ OrHash =
2114
+ T.type_alias do
2115
+ T.any(
2116
+ DockerEngineAPI::Container::HostConfig::LogConfig,
2117
+ DockerEngineAPI::Internal::AnyHash
2118
+ )
2119
+ end
2120
+
2121
+ # Driver-specific configuration options for the logging driver.
2122
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2123
+ attr_reader :config
2124
+
2125
+ sig { params(config: T::Hash[Symbol, String]).void }
2126
+ attr_writer :config
2127
+
2128
+ # Name of the logging driver used for the container or "none" if logging is
2129
+ # disabled.
2130
+ sig do
2131
+ returns(
2132
+ T.nilable(
2133
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2134
+ )
2135
+ )
2136
+ end
2137
+ attr_reader :type
2138
+
2139
+ sig do
2140
+ params(
2141
+ type:
2142
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::OrSymbol
2143
+ ).void
2144
+ end
2145
+ attr_writer :type
2146
+
2147
+ # The logging configuration for this container
2148
+ sig do
2149
+ params(
2150
+ config: T::Hash[Symbol, String],
2151
+ type:
2152
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::OrSymbol
2153
+ ).returns(T.attached_class)
2154
+ end
2155
+ def self.new(
2156
+ # Driver-specific configuration options for the logging driver.
2157
+ config: nil,
2158
+ # Name of the logging driver used for the container or "none" if logging is
2159
+ # disabled.
2160
+ type: nil
2161
+ )
2162
+ end
2163
+
2164
+ sig do
2165
+ override.returns(
2166
+ {
2167
+ config: T::Hash[Symbol, String],
2168
+ type:
2169
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2170
+ }
2171
+ )
2172
+ end
2173
+ def to_hash
2174
+ end
2175
+
2176
+ # Name of the logging driver used for the container or "none" if logging is
2177
+ # disabled.
2178
+ module Type
2179
+ extend DockerEngineAPI::Internal::Type::Enum
2180
+
2181
+ TaggedSymbol =
2182
+ T.type_alias do
2183
+ T.all(
2184
+ Symbol,
2185
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type
2186
+ )
2187
+ end
2188
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2189
+
2190
+ LOCAL =
2191
+ T.let(
2192
+ :local,
2193
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2194
+ )
2195
+ JSON_FILE =
2196
+ T.let(
2197
+ :"json-file",
2198
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2199
+ )
2200
+ SYSLOG =
2201
+ T.let(
2202
+ :syslog,
2203
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2204
+ )
2205
+ JOURNALD =
2206
+ T.let(
2207
+ :journald,
2208
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2209
+ )
2210
+ GELF =
2211
+ T.let(
2212
+ :gelf,
2213
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2214
+ )
2215
+ FLUENTD =
2216
+ T.let(
2217
+ :fluentd,
2218
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2219
+ )
2220
+ AWSLOGS =
2221
+ T.let(
2222
+ :awslogs,
2223
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2224
+ )
2225
+ SPLUNK =
2226
+ T.let(
2227
+ :splunk,
2228
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2229
+ )
2230
+ ETWLOGS =
2231
+ T.let(
2232
+ :etwlogs,
2233
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2234
+ )
2235
+ NONE =
2236
+ T.let(
2237
+ :none,
2238
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2239
+ )
2240
+
2241
+ sig do
2242
+ override.returns(
2243
+ T::Array[
2244
+ DockerEngineAPI::Container::HostConfig::LogConfig::Type::TaggedSymbol
2245
+ ]
2246
+ )
2247
+ end
2248
+ def self.values
2249
+ end
2250
+ end
2251
+ end
2252
+
2253
+ class Mount < DockerEngineAPI::Internal::Type::BaseModel
2254
+ OrHash =
2255
+ T.type_alias do
2256
+ T.any(
2257
+ DockerEngineAPI::Container::HostConfig::Mount,
2258
+ DockerEngineAPI::Internal::AnyHash
2259
+ )
2260
+ end
2261
+
2262
+ # Optional configuration for the `bind` type.
2263
+ sig do
2264
+ returns(
2265
+ T.nilable(
2266
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions
2267
+ )
2268
+ )
2269
+ end
2270
+ attr_reader :bind_options
2271
+
2272
+ sig do
2273
+ params(
2274
+ bind_options:
2275
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::OrHash
2276
+ ).void
2277
+ end
2278
+ attr_writer :bind_options
2279
+
2280
+ # The consistency requirement for the mount: `default`, `consistent`, `cached`, or
2281
+ # `delegated`.
2282
+ sig { returns(T.nilable(String)) }
2283
+ attr_reader :consistency
2284
+
2285
+ sig { params(consistency: String).void }
2286
+ attr_writer :consistency
2287
+
2288
+ # Optional configuration for the `image` type.
2289
+ sig do
2290
+ returns(
2291
+ T.nilable(
2292
+ DockerEngineAPI::Container::HostConfig::Mount::ImageOptions
2293
+ )
2294
+ )
2295
+ end
2296
+ attr_reader :image_options
2297
+
2298
+ sig do
2299
+ params(
2300
+ image_options:
2301
+ DockerEngineAPI::Container::HostConfig::Mount::ImageOptions::OrHash
2302
+ ).void
2303
+ end
2304
+ attr_writer :image_options
2305
+
2306
+ # Whether the mount should be read-only.
2307
+ sig { returns(T.nilable(T::Boolean)) }
2308
+ attr_reader :read_only
2309
+
2310
+ sig { params(read_only: T::Boolean).void }
2311
+ attr_writer :read_only
2312
+
2313
+ # Mount source (e.g. a volume name, a host path). The source cannot be specified
2314
+ # when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
2315
+ # the `CreateMountpoint` must be set to `true` to create the source path on the
2316
+ # host if missing.
2317
+ #
2318
+ # For `Type=npipe`, the pipe must exist prior to creating the container.
2319
+ sig { returns(T.nilable(String)) }
2320
+ attr_reader :source
2321
+
2322
+ sig { params(source: String).void }
2323
+ attr_writer :source
2324
+
2325
+ # Container path.
2326
+ sig { returns(T.nilable(String)) }
2327
+ attr_reader :target
2328
+
2329
+ sig { params(target: String).void }
2330
+ attr_writer :target
2331
+
2332
+ # Optional configuration for the `tmpfs` type.
2333
+ sig do
2334
+ returns(
2335
+ T.nilable(
2336
+ DockerEngineAPI::Container::HostConfig::Mount::TmpfsOptions
2337
+ )
2338
+ )
2339
+ end
2340
+ attr_reader :tmpfs_options
2341
+
2342
+ sig do
2343
+ params(
2344
+ tmpfs_options:
2345
+ DockerEngineAPI::Container::HostConfig::Mount::TmpfsOptions::OrHash
2346
+ ).void
2347
+ end
2348
+ attr_writer :tmpfs_options
2349
+
2350
+ # The mount type. Available types:
2351
+ #
2352
+ # - `bind` a mount of a file or directory from the host into the container.
2353
+ # - `cluster` a Swarm cluster volume.
2354
+ # - `image` an OCI image.
2355
+ # - `npipe` a named pipe from the host into the container.
2356
+ # - `tmpfs` a `tmpfs`.
2357
+ # - `volume` a docker volume with the given `Name`.
2358
+ sig do
2359
+ returns(
2360
+ T.nilable(
2361
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2362
+ )
2363
+ )
2364
+ end
2365
+ attr_reader :type
2366
+
2367
+ sig do
2368
+ params(
2369
+ type:
2370
+ DockerEngineAPI::Container::HostConfig::Mount::Type::OrSymbol
2371
+ ).void
2372
+ end
2373
+ attr_writer :type
2374
+
2375
+ # Optional configuration for the `volume` type.
2376
+ sig do
2377
+ returns(
2378
+ T.nilable(
2379
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions
2380
+ )
2381
+ )
2382
+ end
2383
+ attr_reader :volume_options
2384
+
2385
+ sig do
2386
+ params(
2387
+ volume_options:
2388
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::OrHash
2389
+ ).void
2390
+ end
2391
+ attr_writer :volume_options
2392
+
2393
+ sig do
2394
+ params(
2395
+ bind_options:
2396
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::OrHash,
2397
+ consistency: String,
2398
+ image_options:
2399
+ DockerEngineAPI::Container::HostConfig::Mount::ImageOptions::OrHash,
2400
+ read_only: T::Boolean,
2401
+ source: String,
2402
+ target: String,
2403
+ tmpfs_options:
2404
+ DockerEngineAPI::Container::HostConfig::Mount::TmpfsOptions::OrHash,
2405
+ type:
2406
+ DockerEngineAPI::Container::HostConfig::Mount::Type::OrSymbol,
2407
+ volume_options:
2408
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::OrHash
2409
+ ).returns(T.attached_class)
2410
+ end
2411
+ def self.new(
2412
+ # Optional configuration for the `bind` type.
2413
+ bind_options: nil,
2414
+ # The consistency requirement for the mount: `default`, `consistent`, `cached`, or
2415
+ # `delegated`.
2416
+ consistency: nil,
2417
+ # Optional configuration for the `image` type.
2418
+ image_options: nil,
2419
+ # Whether the mount should be read-only.
2420
+ read_only: nil,
2421
+ # Mount source (e.g. a volume name, a host path). The source cannot be specified
2422
+ # when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
2423
+ # the `CreateMountpoint` must be set to `true` to create the source path on the
2424
+ # host if missing.
2425
+ #
2426
+ # For `Type=npipe`, the pipe must exist prior to creating the container.
2427
+ source: nil,
2428
+ # Container path.
2429
+ target: nil,
2430
+ # Optional configuration for the `tmpfs` type.
2431
+ tmpfs_options: nil,
2432
+ # The mount type. Available types:
2433
+ #
2434
+ # - `bind` a mount of a file or directory from the host into the container.
2435
+ # - `cluster` a Swarm cluster volume.
2436
+ # - `image` an OCI image.
2437
+ # - `npipe` a named pipe from the host into the container.
2438
+ # - `tmpfs` a `tmpfs`.
2439
+ # - `volume` a docker volume with the given `Name`.
2440
+ type: nil,
2441
+ # Optional configuration for the `volume` type.
2442
+ volume_options: nil
2443
+ )
2444
+ end
2445
+
2446
+ sig do
2447
+ override.returns(
2448
+ {
2449
+ bind_options:
2450
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions,
2451
+ consistency: String,
2452
+ image_options:
2453
+ DockerEngineAPI::Container::HostConfig::Mount::ImageOptions,
2454
+ read_only: T::Boolean,
2455
+ source: String,
2456
+ target: String,
2457
+ tmpfs_options:
2458
+ DockerEngineAPI::Container::HostConfig::Mount::TmpfsOptions,
2459
+ type:
2460
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol,
2461
+ volume_options:
2462
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions
2463
+ }
2464
+ )
2465
+ end
2466
+ def to_hash
2467
+ end
2468
+
2469
+ class BindOptions < DockerEngineAPI::Internal::Type::BaseModel
2470
+ OrHash =
2471
+ T.type_alias do
2472
+ T.any(
2473
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions,
2474
+ DockerEngineAPI::Internal::AnyHash
2475
+ )
2476
+ end
2477
+
2478
+ # Create mount point on host if missing
2479
+ sig { returns(T.nilable(T::Boolean)) }
2480
+ attr_reader :create_mountpoint
2481
+
2482
+ sig { params(create_mountpoint: T::Boolean).void }
2483
+ attr_writer :create_mountpoint
2484
+
2485
+ # Disable recursive bind mount.
2486
+ sig { returns(T.nilable(T::Boolean)) }
2487
+ attr_reader :non_recursive
2488
+
2489
+ sig { params(non_recursive: T::Boolean).void }
2490
+ attr_writer :non_recursive
2491
+
2492
+ # A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
2493
+ sig do
2494
+ returns(
2495
+ T.nilable(
2496
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2497
+ )
2498
+ )
2499
+ end
2500
+ attr_reader :propagation
2501
+
2502
+ sig do
2503
+ params(
2504
+ propagation:
2505
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::OrSymbol
2506
+ ).void
2507
+ end
2508
+ attr_writer :propagation
2509
+
2510
+ # Raise an error if the mount cannot be made recursively read-only.
2511
+ sig { returns(T.nilable(T::Boolean)) }
2512
+ attr_reader :read_only_force_recursive
2513
+
2514
+ sig { params(read_only_force_recursive: T::Boolean).void }
2515
+ attr_writer :read_only_force_recursive
2516
+
2517
+ # Make the mount non-recursively read-only, but still leave the mount recursive
2518
+ # (unless NonRecursive is set to `true` in conjunction).
2519
+ #
2520
+ # Added in v1.44, before that version all read-only mounts were non-recursive by
2521
+ # default. To match the previous behaviour this will default to `true` for clients
2522
+ # on versions prior to v1.44.
2523
+ sig { returns(T.nilable(T::Boolean)) }
2524
+ attr_reader :read_only_non_recursive
2525
+
2526
+ sig { params(read_only_non_recursive: T::Boolean).void }
2527
+ attr_writer :read_only_non_recursive
2528
+
2529
+ # Optional configuration for the `bind` type.
2530
+ sig do
2531
+ params(
2532
+ create_mountpoint: T::Boolean,
2533
+ non_recursive: T::Boolean,
2534
+ propagation:
2535
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::OrSymbol,
2536
+ read_only_force_recursive: T::Boolean,
2537
+ read_only_non_recursive: T::Boolean
2538
+ ).returns(T.attached_class)
2539
+ end
2540
+ def self.new(
2541
+ # Create mount point on host if missing
2542
+ create_mountpoint: nil,
2543
+ # Disable recursive bind mount.
2544
+ non_recursive: nil,
2545
+ # A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
2546
+ propagation: nil,
2547
+ # Raise an error if the mount cannot be made recursively read-only.
2548
+ read_only_force_recursive: nil,
2549
+ # Make the mount non-recursively read-only, but still leave the mount recursive
2550
+ # (unless NonRecursive is set to `true` in conjunction).
2551
+ #
2552
+ # Added in v1.44, before that version all read-only mounts were non-recursive by
2553
+ # default. To match the previous behaviour this will default to `true` for clients
2554
+ # on versions prior to v1.44.
2555
+ read_only_non_recursive: nil
2556
+ )
2557
+ end
2558
+
2559
+ sig do
2560
+ override.returns(
2561
+ {
2562
+ create_mountpoint: T::Boolean,
2563
+ non_recursive: T::Boolean,
2564
+ propagation:
2565
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol,
2566
+ read_only_force_recursive: T::Boolean,
2567
+ read_only_non_recursive: T::Boolean
2568
+ }
2569
+ )
2570
+ end
2571
+ def to_hash
2572
+ end
2573
+
2574
+ # A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
2575
+ module Propagation
2576
+ extend DockerEngineAPI::Internal::Type::Enum
2577
+
2578
+ TaggedSymbol =
2579
+ T.type_alias do
2580
+ T.all(
2581
+ Symbol,
2582
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation
2583
+ )
2584
+ end
2585
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2586
+
2587
+ PRIVATE =
2588
+ T.let(
2589
+ :private,
2590
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2591
+ )
2592
+ RPRIVATE =
2593
+ T.let(
2594
+ :rprivate,
2595
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2596
+ )
2597
+ SHARED =
2598
+ T.let(
2599
+ :shared,
2600
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2601
+ )
2602
+ RSHARED =
2603
+ T.let(
2604
+ :rshared,
2605
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2606
+ )
2607
+ SLAVE =
2608
+ T.let(
2609
+ :slave,
2610
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2611
+ )
2612
+ RSLAVE =
2613
+ T.let(
2614
+ :rslave,
2615
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2616
+ )
2617
+
2618
+ sig do
2619
+ override.returns(
2620
+ T::Array[
2621
+ DockerEngineAPI::Container::HostConfig::Mount::BindOptions::Propagation::TaggedSymbol
2622
+ ]
2623
+ )
2624
+ end
2625
+ def self.values
2626
+ end
2627
+ end
2628
+ end
2629
+
2630
+ class ImageOptions < DockerEngineAPI::Internal::Type::BaseModel
2631
+ OrHash =
2632
+ T.type_alias do
2633
+ T.any(
2634
+ DockerEngineAPI::Container::HostConfig::Mount::ImageOptions,
2635
+ DockerEngineAPI::Internal::AnyHash
2636
+ )
2637
+ end
2638
+
2639
+ # Source path inside the image. Must be relative without any back traversals.
2640
+ sig { returns(T.nilable(String)) }
2641
+ attr_reader :subpath
2642
+
2643
+ sig { params(subpath: String).void }
2644
+ attr_writer :subpath
2645
+
2646
+ # Optional configuration for the `image` type.
2647
+ sig { params(subpath: String).returns(T.attached_class) }
2648
+ def self.new(
2649
+ # Source path inside the image. Must be relative without any back traversals.
2650
+ subpath: nil
2651
+ )
2652
+ end
2653
+
2654
+ sig { override.returns({ subpath: String }) }
2655
+ def to_hash
2656
+ end
2657
+ end
2658
+
2659
+ class TmpfsOptions < DockerEngineAPI::Internal::Type::BaseModel
2660
+ OrHash =
2661
+ T.type_alias do
2662
+ T.any(
2663
+ DockerEngineAPI::Container::HostConfig::Mount::TmpfsOptions,
2664
+ DockerEngineAPI::Internal::AnyHash
2665
+ )
2666
+ end
2667
+
2668
+ # The permission mode for the tmpfs mount in an integer. The value must not be in
2669
+ # octal format (e.g. 755) but rather the decimal representation of the octal value
2670
+ # (e.g. 493).
2671
+ sig { returns(T.nilable(Integer)) }
2672
+ attr_reader :mode
2673
+
2674
+ sig { params(mode: Integer).void }
2675
+ attr_writer :mode
2676
+
2677
+ # The options to be passed to the tmpfs mount. An array of arrays. Flag options
2678
+ # should be provided as 1-length arrays. Other types should be provided as as
2679
+ # 2-length arrays, where the first item is the key and the second the value.
2680
+ sig { returns(T.nilable(T::Array[T::Array[String]])) }
2681
+ attr_reader :options
2682
+
2683
+ sig { params(options: T::Array[T::Array[String]]).void }
2684
+ attr_writer :options
2685
+
2686
+ # The size for the tmpfs mount in bytes.
2687
+ sig { returns(T.nilable(Integer)) }
2688
+ attr_reader :size_bytes
2689
+
2690
+ sig { params(size_bytes: Integer).void }
2691
+ attr_writer :size_bytes
2692
+
2693
+ # Optional configuration for the `tmpfs` type.
2694
+ sig do
2695
+ params(
2696
+ mode: Integer,
2697
+ options: T::Array[T::Array[String]],
2698
+ size_bytes: Integer
2699
+ ).returns(T.attached_class)
2700
+ end
2701
+ def self.new(
2702
+ # The permission mode for the tmpfs mount in an integer. The value must not be in
2703
+ # octal format (e.g. 755) but rather the decimal representation of the octal value
2704
+ # (e.g. 493).
2705
+ mode: nil,
2706
+ # The options to be passed to the tmpfs mount. An array of arrays. Flag options
2707
+ # should be provided as 1-length arrays. Other types should be provided as as
2708
+ # 2-length arrays, where the first item is the key and the second the value.
2709
+ options: nil,
2710
+ # The size for the tmpfs mount in bytes.
2711
+ size_bytes: nil
2712
+ )
2713
+ end
2714
+
2715
+ sig do
2716
+ override.returns(
2717
+ {
2718
+ mode: Integer,
2719
+ options: T::Array[T::Array[String]],
2720
+ size_bytes: Integer
2721
+ }
2722
+ )
2723
+ end
2724
+ def to_hash
2725
+ end
2726
+ end
2727
+
2728
+ # The mount type. Available types:
2729
+ #
2730
+ # - `bind` a mount of a file or directory from the host into the container.
2731
+ # - `cluster` a Swarm cluster volume.
2732
+ # - `image` an OCI image.
2733
+ # - `npipe` a named pipe from the host into the container.
2734
+ # - `tmpfs` a `tmpfs`.
2735
+ # - `volume` a docker volume with the given `Name`.
2736
+ module Type
2737
+ extend DockerEngineAPI::Internal::Type::Enum
2738
+
2739
+ TaggedSymbol =
2740
+ T.type_alias do
2741
+ T.all(
2742
+ Symbol,
2743
+ DockerEngineAPI::Container::HostConfig::Mount::Type
2744
+ )
2745
+ end
2746
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2747
+
2748
+ BIND =
2749
+ T.let(
2750
+ :bind,
2751
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2752
+ )
2753
+ CLUSTER =
2754
+ T.let(
2755
+ :cluster,
2756
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2757
+ )
2758
+ IMAGE =
2759
+ T.let(
2760
+ :image,
2761
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2762
+ )
2763
+ NPIPE =
2764
+ T.let(
2765
+ :npipe,
2766
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2767
+ )
2768
+ TMPFS =
2769
+ T.let(
2770
+ :tmpfs,
2771
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2772
+ )
2773
+ VOLUME =
2774
+ T.let(
2775
+ :volume,
2776
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2777
+ )
2778
+
2779
+ sig do
2780
+ override.returns(
2781
+ T::Array[
2782
+ DockerEngineAPI::Container::HostConfig::Mount::Type::TaggedSymbol
2783
+ ]
2784
+ )
2785
+ end
2786
+ def self.values
2787
+ end
2788
+ end
2789
+
2790
+ class VolumeOptions < DockerEngineAPI::Internal::Type::BaseModel
2791
+ OrHash =
2792
+ T.type_alias do
2793
+ T.any(
2794
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions,
2795
+ DockerEngineAPI::Internal::AnyHash
2796
+ )
2797
+ end
2798
+
2799
+ # Map of driver specific options
2800
+ sig do
2801
+ returns(
2802
+ T.nilable(
2803
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::DriverConfig
2804
+ )
2805
+ )
2806
+ end
2807
+ attr_reader :driver_config
2808
+
2809
+ sig do
2810
+ params(
2811
+ driver_config:
2812
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::DriverConfig::OrHash
2813
+ ).void
2814
+ end
2815
+ attr_writer :driver_config
2816
+
2817
+ # User-defined key/value metadata.
2818
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2819
+ attr_reader :labels
2820
+
2821
+ sig { params(labels: T::Hash[Symbol, String]).void }
2822
+ attr_writer :labels
2823
+
2824
+ # Populate volume with data from the target.
2825
+ sig { returns(T.nilable(T::Boolean)) }
2826
+ attr_reader :no_copy
2827
+
2828
+ sig { params(no_copy: T::Boolean).void }
2829
+ attr_writer :no_copy
2830
+
2831
+ # Source path inside the volume. Must be relative without any back traversals.
2832
+ sig { returns(T.nilable(String)) }
2833
+ attr_reader :subpath
2834
+
2835
+ sig { params(subpath: String).void }
2836
+ attr_writer :subpath
2837
+
2838
+ # Optional configuration for the `volume` type.
2839
+ sig do
2840
+ params(
2841
+ driver_config:
2842
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::DriverConfig::OrHash,
2843
+ labels: T::Hash[Symbol, String],
2844
+ no_copy: T::Boolean,
2845
+ subpath: String
2846
+ ).returns(T.attached_class)
2847
+ end
2848
+ def self.new(
2849
+ # Map of driver specific options
2850
+ driver_config: nil,
2851
+ # User-defined key/value metadata.
2852
+ labels: nil,
2853
+ # Populate volume with data from the target.
2854
+ no_copy: nil,
2855
+ # Source path inside the volume. Must be relative without any back traversals.
2856
+ subpath: nil
2857
+ )
2858
+ end
2859
+
2860
+ sig do
2861
+ override.returns(
2862
+ {
2863
+ driver_config:
2864
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::DriverConfig,
2865
+ labels: T::Hash[Symbol, String],
2866
+ no_copy: T::Boolean,
2867
+ subpath: String
2868
+ }
2869
+ )
2870
+ end
2871
+ def to_hash
2872
+ end
2873
+
2874
+ class DriverConfig < DockerEngineAPI::Internal::Type::BaseModel
2875
+ OrHash =
2876
+ T.type_alias do
2877
+ T.any(
2878
+ DockerEngineAPI::Container::HostConfig::Mount::VolumeOptions::DriverConfig,
2879
+ DockerEngineAPI::Internal::AnyHash
2880
+ )
2881
+ end
2882
+
2883
+ # Name of the driver to use to create the volume.
2884
+ sig { returns(T.nilable(String)) }
2885
+ attr_reader :name
2886
+
2887
+ sig { params(name: String).void }
2888
+ attr_writer :name
2889
+
2890
+ # key/value map of driver specific options.
2891
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
2892
+ attr_reader :options
2893
+
2894
+ sig { params(options: T::Hash[Symbol, String]).void }
2895
+ attr_writer :options
2896
+
2897
+ # Map of driver specific options
2898
+ sig do
2899
+ params(name: String, options: T::Hash[Symbol, String]).returns(
2900
+ T.attached_class
2901
+ )
2902
+ end
2903
+ def self.new(
2904
+ # Name of the driver to use to create the volume.
2905
+ name: nil,
2906
+ # key/value map of driver specific options.
2907
+ options: nil
2908
+ )
2909
+ end
2910
+
2911
+ sig do
2912
+ override.returns(
2913
+ { name: String, options: T::Hash[Symbol, String] }
2914
+ )
2915
+ end
2916
+ def to_hash
2917
+ end
2918
+ end
2919
+ end
2920
+ end
2921
+
2922
+ class PortBinding < DockerEngineAPI::Internal::Type::BaseModel
2923
+ OrHash =
2924
+ T.type_alias do
2925
+ T.any(
2926
+ DockerEngineAPI::Container::HostConfig::PortBinding,
2927
+ DockerEngineAPI::Internal::AnyHash
2928
+ )
2929
+ end
2930
+
2931
+ # Host IP address that the container's port is mapped to.
2932
+ sig { returns(T.nilable(String)) }
2933
+ attr_reader :host_ip
2934
+
2935
+ sig { params(host_ip: String).void }
2936
+ attr_writer :host_ip
2937
+
2938
+ # Host port number that the container's port is mapped to.
2939
+ sig { returns(T.nilable(String)) }
2940
+ attr_reader :host_port
2941
+
2942
+ sig { params(host_port: String).void }
2943
+ attr_writer :host_port
2944
+
2945
+ # PortBinding represents a binding between a host IP address and a host port.
2946
+ sig do
2947
+ params(host_ip: String, host_port: String).returns(T.attached_class)
2948
+ end
2949
+ def self.new(
2950
+ # Host IP address that the container's port is mapped to.
2951
+ host_ip: nil,
2952
+ # Host port number that the container's port is mapped to.
2953
+ host_port: nil
2954
+ )
2955
+ end
2956
+
2957
+ sig { override.returns({ host_ip: String, host_port: String }) }
2958
+ def to_hash
2959
+ end
2960
+ end
2961
+
2962
+ class RestartPolicy < DockerEngineAPI::Internal::Type::BaseModel
2963
+ OrHash =
2964
+ T.type_alias do
2965
+ T.any(
2966
+ DockerEngineAPI::Container::HostConfig::RestartPolicy,
2967
+ DockerEngineAPI::Internal::AnyHash
2968
+ )
2969
+ end
2970
+
2971
+ # If `on-failure` is used, the number of times to retry before giving up.
2972
+ sig { returns(T.nilable(Integer)) }
2973
+ attr_reader :maximum_retry_count
2974
+
2975
+ sig { params(maximum_retry_count: Integer).void }
2976
+ attr_writer :maximum_retry_count
2977
+
2978
+ # - Empty string means not to restart
2979
+ # - `no` Do not automatically restart
2980
+ # - `always` Always restart
2981
+ # - `unless-stopped` Restart always except when the user has manually stopped the
2982
+ # container
2983
+ # - `on-failure` Restart only when the container exit code is non-zero
2984
+ sig do
2985
+ returns(
2986
+ T.nilable(
2987
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
2988
+ )
2989
+ )
2990
+ end
2991
+ attr_reader :name
2992
+
2993
+ sig do
2994
+ params(
2995
+ name:
2996
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::OrSymbol
2997
+ ).void
2998
+ end
2999
+ attr_writer :name
3000
+
3001
+ # The behavior to apply when the container exits. The default is not to restart.
3002
+ #
3003
+ # An ever increasing delay (double the previous delay, starting at 100ms) is added
3004
+ # before each restart to prevent flooding the server.
3005
+ sig do
3006
+ params(
3007
+ maximum_retry_count: Integer,
3008
+ name:
3009
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::OrSymbol
3010
+ ).returns(T.attached_class)
3011
+ end
3012
+ def self.new(
3013
+ # If `on-failure` is used, the number of times to retry before giving up.
3014
+ maximum_retry_count: nil,
3015
+ # - Empty string means not to restart
3016
+ # - `no` Do not automatically restart
3017
+ # - `always` Always restart
3018
+ # - `unless-stopped` Restart always except when the user has manually stopped the
3019
+ # container
3020
+ # - `on-failure` Restart only when the container exit code is non-zero
3021
+ name: nil
3022
+ )
3023
+ end
3024
+
3025
+ sig do
3026
+ override.returns(
3027
+ {
3028
+ maximum_retry_count: Integer,
3029
+ name:
3030
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3031
+ }
3032
+ )
3033
+ end
3034
+ def to_hash
3035
+ end
3036
+
3037
+ # - Empty string means not to restart
3038
+ # - `no` Do not automatically restart
3039
+ # - `always` Always restart
3040
+ # - `unless-stopped` Restart always except when the user has manually stopped the
3041
+ # container
3042
+ # - `on-failure` Restart only when the container exit code is non-zero
3043
+ module Name
3044
+ extend DockerEngineAPI::Internal::Type::Enum
3045
+
3046
+ TaggedSymbol =
3047
+ T.type_alias do
3048
+ T.all(
3049
+ Symbol,
3050
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name
3051
+ )
3052
+ end
3053
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3054
+
3055
+ EMPTY =
3056
+ T.let(
3057
+ :"",
3058
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3059
+ )
3060
+ NO =
3061
+ T.let(
3062
+ :no,
3063
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3064
+ )
3065
+ ALWAYS =
3066
+ T.let(
3067
+ :always,
3068
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3069
+ )
3070
+ UNLESS_STOPPED =
3071
+ T.let(
3072
+ :"unless-stopped",
3073
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3074
+ )
3075
+ ON_FAILURE =
3076
+ T.let(
3077
+ :"on-failure",
3078
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3079
+ )
3080
+
3081
+ sig do
3082
+ override.returns(
3083
+ T::Array[
3084
+ DockerEngineAPI::Container::HostConfig::RestartPolicy::Name::TaggedSymbol
3085
+ ]
3086
+ )
3087
+ end
3088
+ def self.values
3089
+ end
3090
+ end
3091
+ end
3092
+
3093
+ class Ulimit < DockerEngineAPI::Internal::Type::BaseModel
3094
+ OrHash =
3095
+ T.type_alias do
3096
+ T.any(
3097
+ DockerEngineAPI::Container::HostConfig::Ulimit,
3098
+ DockerEngineAPI::Internal::AnyHash
3099
+ )
3100
+ end
3101
+
3102
+ # Hard limit
3103
+ sig { returns(T.nilable(Integer)) }
3104
+ attr_reader :hard
3105
+
3106
+ sig { params(hard: Integer).void }
3107
+ attr_writer :hard
3108
+
3109
+ # Name of ulimit
3110
+ sig { returns(T.nilable(String)) }
3111
+ attr_reader :name
3112
+
3113
+ sig { params(name: String).void }
3114
+ attr_writer :name
3115
+
3116
+ # Soft limit
3117
+ sig { returns(T.nilable(Integer)) }
3118
+ attr_reader :soft
3119
+
3120
+ sig { params(soft: Integer).void }
3121
+ attr_writer :soft
3122
+
3123
+ sig do
3124
+ params(hard: Integer, name: String, soft: Integer).returns(
3125
+ T.attached_class
3126
+ )
3127
+ end
3128
+ def self.new(
3129
+ # Hard limit
3130
+ hard: nil,
3131
+ # Name of ulimit
3132
+ name: nil,
3133
+ # Soft limit
3134
+ soft: nil
3135
+ )
3136
+ end
3137
+
3138
+ sig do
3139
+ override.returns({ hard: Integer, name: String, soft: Integer })
3140
+ end
3141
+ def to_hash
3142
+ end
3143
+ end
3144
+ end
3145
+
3146
+ class ImageManifestDescriptor < DockerEngineAPI::Internal::Type::BaseModel
3147
+ OrHash =
3148
+ T.type_alias do
3149
+ T.any(
3150
+ DockerEngineAPI::Container::ImageManifestDescriptor,
3151
+ DockerEngineAPI::Internal::AnyHash
3152
+ )
3153
+ end
3154
+
3155
+ # Arbitrary metadata relating to the targeted content.
3156
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
3157
+ attr_accessor :annotations
3158
+
3159
+ # ArtifactType is the IANA media type of this artifact.
3160
+ sig { returns(T.nilable(String)) }
3161
+ attr_accessor :artifact_type
3162
+
3163
+ # Data is an embedding of the targeted content. This is encoded as a base64 string
3164
+ # when marshalled to JSON (automatically, by encoding/json). If present, Data can
3165
+ # be used directly to avoid fetching the targeted content.
3166
+ sig { returns(T.nilable(String)) }
3167
+ attr_accessor :data
3168
+
3169
+ # The digest of the targeted content.
3170
+ sig { returns(T.nilable(String)) }
3171
+ attr_reader :digest
3172
+
3173
+ sig { params(digest: String).void }
3174
+ attr_writer :digest
3175
+
3176
+ # The media type of the object this schema refers to.
3177
+ sig { returns(T.nilable(String)) }
3178
+ attr_reader :media_type
3179
+
3180
+ sig { params(media_type: String).void }
3181
+ attr_writer :media_type
3182
+
3183
+ # Describes the platform which the image in the manifest runs on, as defined in
3184
+ # the
3185
+ # [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md).
3186
+ sig do
3187
+ returns(
3188
+ T.nilable(
3189
+ DockerEngineAPI::Container::ImageManifestDescriptor::Platform
3190
+ )
3191
+ )
3192
+ end
3193
+ attr_reader :platform
3194
+
3195
+ sig do
3196
+ params(
3197
+ platform:
3198
+ T.nilable(
3199
+ DockerEngineAPI::Container::ImageManifestDescriptor::Platform::OrHash
3200
+ )
3201
+ ).void
3202
+ end
3203
+ attr_writer :platform
3204
+
3205
+ # The size in bytes of the blob.
3206
+ sig { returns(T.nilable(Integer)) }
3207
+ attr_reader :size
3208
+
3209
+ sig { params(size: Integer).void }
3210
+ attr_writer :size
3211
+
3212
+ # List of URLs from which this object MAY be downloaded.
3213
+ sig { returns(T.nilable(T::Array[String])) }
3214
+ attr_accessor :urls
3215
+
3216
+ # A descriptor struct containing digest, media type, and size, as defined in the
3217
+ # [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).
3218
+ sig do
3219
+ params(
3220
+ annotations: T.nilable(T::Hash[Symbol, String]),
3221
+ artifact_type: T.nilable(String),
3222
+ data: T.nilable(String),
3223
+ digest: String,
3224
+ media_type: String,
3225
+ platform:
3226
+ T.nilable(
3227
+ DockerEngineAPI::Container::ImageManifestDescriptor::Platform::OrHash
3228
+ ),
3229
+ size: Integer,
3230
+ urls: T.nilable(T::Array[String])
3231
+ ).returns(T.attached_class)
3232
+ end
3233
+ def self.new(
3234
+ # Arbitrary metadata relating to the targeted content.
3235
+ annotations: nil,
3236
+ # ArtifactType is the IANA media type of this artifact.
3237
+ artifact_type: nil,
3238
+ # Data is an embedding of the targeted content. This is encoded as a base64 string
3239
+ # when marshalled to JSON (automatically, by encoding/json). If present, Data can
3240
+ # be used directly to avoid fetching the targeted content.
3241
+ data: nil,
3242
+ # The digest of the targeted content.
3243
+ digest: nil,
3244
+ # The media type of the object this schema refers to.
3245
+ media_type: nil,
3246
+ # Describes the platform which the image in the manifest runs on, as defined in
3247
+ # the
3248
+ # [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md).
3249
+ platform: nil,
3250
+ # The size in bytes of the blob.
3251
+ size: nil,
3252
+ # List of URLs from which this object MAY be downloaded.
3253
+ urls: nil
3254
+ )
3255
+ end
3256
+
3257
+ sig do
3258
+ override.returns(
3259
+ {
3260
+ annotations: T.nilable(T::Hash[Symbol, String]),
3261
+ artifact_type: T.nilable(String),
3262
+ data: T.nilable(String),
3263
+ digest: String,
3264
+ media_type: String,
3265
+ platform:
3266
+ T.nilable(
3267
+ DockerEngineAPI::Container::ImageManifestDescriptor::Platform
3268
+ ),
3269
+ size: Integer,
3270
+ urls: T.nilable(T::Array[String])
3271
+ }
3272
+ )
3273
+ end
3274
+ def to_hash
3275
+ end
3276
+
3277
+ class Platform < DockerEngineAPI::Internal::Type::BaseModel
3278
+ OrHash =
3279
+ T.type_alias do
3280
+ T.any(
3281
+ DockerEngineAPI::Container::ImageManifestDescriptor::Platform,
3282
+ DockerEngineAPI::Internal::AnyHash
3283
+ )
3284
+ end
3285
+
3286
+ # The CPU architecture, for example `amd64` or `ppc64`.
3287
+ sig { returns(T.nilable(String)) }
3288
+ attr_reader :architecture
3289
+
3290
+ sig { params(architecture: String).void }
3291
+ attr_writer :architecture
3292
+
3293
+ # The operating system, for example `linux` or `windows`.
3294
+ sig { returns(T.nilable(String)) }
3295
+ attr_reader :os
3296
+
3297
+ sig { params(os: String).void }
3298
+ attr_writer :os
3299
+
3300
+ # Optional field specifying an array of strings, each listing a required OS
3301
+ # feature (for example on Windows `win32k`).
3302
+ sig { returns(T.nilable(T::Array[String])) }
3303
+ attr_reader :os_features
3304
+
3305
+ sig { params(os_features: T::Array[String]).void }
3306
+ attr_writer :os_features
3307
+
3308
+ # Optional field specifying the operating system version, for example on Windows
3309
+ # `10.0.19041.1165`.
3310
+ sig { returns(T.nilable(String)) }
3311
+ attr_reader :os_version
3312
+
3313
+ sig { params(os_version: String).void }
3314
+ attr_writer :os_version
3315
+
3316
+ # Optional field specifying a variant of the CPU, for example `v7` to specify
3317
+ # ARMv7 when architecture is `arm`.
3318
+ sig { returns(T.nilable(String)) }
3319
+ attr_reader :variant
3320
+
3321
+ sig { params(variant: String).void }
3322
+ attr_writer :variant
3323
+
3324
+ # Describes the platform which the image in the manifest runs on, as defined in
3325
+ # the
3326
+ # [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md).
3327
+ sig do
3328
+ params(
3329
+ architecture: String,
3330
+ os: String,
3331
+ os_features: T::Array[String],
3332
+ os_version: String,
3333
+ variant: String
3334
+ ).returns(T.attached_class)
3335
+ end
3336
+ def self.new(
3337
+ # The CPU architecture, for example `amd64` or `ppc64`.
3338
+ architecture: nil,
3339
+ # The operating system, for example `linux` or `windows`.
3340
+ os: nil,
3341
+ # Optional field specifying an array of strings, each listing a required OS
3342
+ # feature (for example on Windows `win32k`).
3343
+ os_features: nil,
3344
+ # Optional field specifying the operating system version, for example on Windows
3345
+ # `10.0.19041.1165`.
3346
+ os_version: nil,
3347
+ # Optional field specifying a variant of the CPU, for example `v7` to specify
3348
+ # ARMv7 when architecture is `arm`.
3349
+ variant: nil
3350
+ )
3351
+ end
3352
+
3353
+ sig do
3354
+ override.returns(
3355
+ {
3356
+ architecture: String,
3357
+ os: String,
3358
+ os_features: T::Array[String],
3359
+ os_version: String,
3360
+ variant: String
3361
+ }
3362
+ )
3363
+ end
3364
+ def to_hash
3365
+ end
3366
+ end
3367
+ end
3368
+
3369
+ class Mount < DockerEngineAPI::Internal::Type::BaseModel
3370
+ OrHash =
3371
+ T.type_alias do
3372
+ T.any(
3373
+ DockerEngineAPI::Container::Mount,
3374
+ DockerEngineAPI::Internal::AnyHash
3375
+ )
3376
+ end
3377
+
3378
+ # Destination is the path relative to the container root (`/`) where the `Source`
3379
+ # is mounted inside the container.
3380
+ sig { returns(T.nilable(String)) }
3381
+ attr_reader :destination
3382
+
3383
+ sig { params(destination: String).void }
3384
+ attr_writer :destination
3385
+
3386
+ # Driver is the volume driver used to create the volume (if it is a volume).
3387
+ sig { returns(T.nilable(String)) }
3388
+ attr_reader :driver
3389
+
3390
+ sig { params(driver: String).void }
3391
+ attr_writer :driver
3392
+
3393
+ # Mode is a comma separated list of options supplied by the user when creating the
3394
+ # bind/volume mount.
3395
+ #
3396
+ # The default is platform-specific (`"z"` on Linux, empty on Windows).
3397
+ sig { returns(T.nilable(String)) }
3398
+ attr_reader :mode
3399
+
3400
+ sig { params(mode: String).void }
3401
+ attr_writer :mode
3402
+
3403
+ # Name is the name reference to the underlying data defined by `Source` e.g., the
3404
+ # volume name.
3405
+ sig { returns(T.nilable(String)) }
3406
+ attr_reader :name
3407
+
3408
+ sig { params(name: String).void }
3409
+ attr_writer :name
3410
+
3411
+ # Propagation describes how mounts are propagated from the host into the mount
3412
+ # point, and vice-versa. Refer to the
3413
+ # [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
3414
+ # for details. This field is not used on Windows.
3415
+ sig { returns(T.nilable(String)) }
3416
+ attr_reader :propagation
3417
+
3418
+ sig { params(propagation: String).void }
3419
+ attr_writer :propagation
3420
+
3421
+ # Whether the mount is mounted writable (read-write).
3422
+ sig { returns(T.nilable(T::Boolean)) }
3423
+ attr_reader :rw
3424
+
3425
+ sig { params(rw: T::Boolean).void }
3426
+ attr_writer :rw
3427
+
3428
+ # Source location of the mount.
3429
+ #
3430
+ # For volumes, this contains the storage location of the volume (within
3431
+ # `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the
3432
+ # source (host) part of the bind-mount. For `tmpfs` mount points, this field is
3433
+ # empty.
3434
+ sig { returns(T.nilable(String)) }
3435
+ attr_reader :source
3436
+
3437
+ sig { params(source: String).void }
3438
+ attr_writer :source
3439
+
3440
+ # The mount type. Available types:
3441
+ #
3442
+ # - `bind` a mount of a file or directory from the host into the container.
3443
+ # - `cluster` a Swarm cluster volume.
3444
+ # - `image` an OCI image.
3445
+ # - `npipe` a named pipe from the host into the container.
3446
+ # - `tmpfs` a `tmpfs`.
3447
+ # - `volume` a docker volume with the given `Name`.
3448
+ sig do
3449
+ returns(
3450
+ T.nilable(DockerEngineAPI::Container::Mount::Type::TaggedSymbol)
3451
+ )
3452
+ end
3453
+ attr_reader :type
3454
+
3455
+ sig do
3456
+ params(type: DockerEngineAPI::Container::Mount::Type::OrSymbol).void
3457
+ end
3458
+ attr_writer :type
3459
+
3460
+ # MountPoint represents a mount point configuration inside the container. This is
3461
+ # used for reporting the mountpoints in use by a container.
3462
+ sig do
3463
+ params(
3464
+ destination: String,
3465
+ driver: String,
3466
+ mode: String,
3467
+ name: String,
3468
+ propagation: String,
3469
+ rw: T::Boolean,
3470
+ source: String,
3471
+ type: DockerEngineAPI::Container::Mount::Type::OrSymbol
3472
+ ).returns(T.attached_class)
3473
+ end
3474
+ def self.new(
3475
+ # Destination is the path relative to the container root (`/`) where the `Source`
3476
+ # is mounted inside the container.
3477
+ destination: nil,
3478
+ # Driver is the volume driver used to create the volume (if it is a volume).
3479
+ driver: nil,
3480
+ # Mode is a comma separated list of options supplied by the user when creating the
3481
+ # bind/volume mount.
3482
+ #
3483
+ # The default is platform-specific (`"z"` on Linux, empty on Windows).
3484
+ mode: nil,
3485
+ # Name is the name reference to the underlying data defined by `Source` e.g., the
3486
+ # volume name.
3487
+ name: nil,
3488
+ # Propagation describes how mounts are propagated from the host into the mount
3489
+ # point, and vice-versa. Refer to the
3490
+ # [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
3491
+ # for details. This field is not used on Windows.
3492
+ propagation: nil,
3493
+ # Whether the mount is mounted writable (read-write).
3494
+ rw: nil,
3495
+ # Source location of the mount.
3496
+ #
3497
+ # For volumes, this contains the storage location of the volume (within
3498
+ # `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the
3499
+ # source (host) part of the bind-mount. For `tmpfs` mount points, this field is
3500
+ # empty.
3501
+ source: nil,
3502
+ # The mount type. Available types:
3503
+ #
3504
+ # - `bind` a mount of a file or directory from the host into the container.
3505
+ # - `cluster` a Swarm cluster volume.
3506
+ # - `image` an OCI image.
3507
+ # - `npipe` a named pipe from the host into the container.
3508
+ # - `tmpfs` a `tmpfs`.
3509
+ # - `volume` a docker volume with the given `Name`.
3510
+ type: nil
3511
+ )
3512
+ end
3513
+
3514
+ sig do
3515
+ override.returns(
3516
+ {
3517
+ destination: String,
3518
+ driver: String,
3519
+ mode: String,
3520
+ name: String,
3521
+ propagation: String,
3522
+ rw: T::Boolean,
3523
+ source: String,
3524
+ type: DockerEngineAPI::Container::Mount::Type::TaggedSymbol
3525
+ }
3526
+ )
3527
+ end
3528
+ def to_hash
3529
+ end
3530
+
3531
+ # The mount type. Available types:
3532
+ #
3533
+ # - `bind` a mount of a file or directory from the host into the container.
3534
+ # - `cluster` a Swarm cluster volume.
3535
+ # - `image` an OCI image.
3536
+ # - `npipe` a named pipe from the host into the container.
3537
+ # - `tmpfs` a `tmpfs`.
3538
+ # - `volume` a docker volume with the given `Name`.
3539
+ module Type
3540
+ extend DockerEngineAPI::Internal::Type::Enum
3541
+
3542
+ TaggedSymbol =
3543
+ T.type_alias do
3544
+ T.all(Symbol, DockerEngineAPI::Container::Mount::Type)
3545
+ end
3546
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3547
+
3548
+ BIND =
3549
+ T.let(:bind, DockerEngineAPI::Container::Mount::Type::TaggedSymbol)
3550
+ CLUSTER =
3551
+ T.let(
3552
+ :cluster,
3553
+ DockerEngineAPI::Container::Mount::Type::TaggedSymbol
3554
+ )
3555
+ IMAGE =
3556
+ T.let(:image, DockerEngineAPI::Container::Mount::Type::TaggedSymbol)
3557
+ NPIPE =
3558
+ T.let(:npipe, DockerEngineAPI::Container::Mount::Type::TaggedSymbol)
3559
+ TMPFS =
3560
+ T.let(:tmpfs, DockerEngineAPI::Container::Mount::Type::TaggedSymbol)
3561
+ VOLUME =
3562
+ T.let(
3563
+ :volume,
3564
+ DockerEngineAPI::Container::Mount::Type::TaggedSymbol
3565
+ )
3566
+
3567
+ sig do
3568
+ override.returns(
3569
+ T::Array[DockerEngineAPI::Container::Mount::Type::TaggedSymbol]
3570
+ )
3571
+ end
3572
+ def self.values
3573
+ end
3574
+ end
3575
+ end
3576
+
3577
+ class NetworkSettings < DockerEngineAPI::Internal::Type::BaseModel
3578
+ OrHash =
3579
+ T.type_alias do
3580
+ T.any(
3581
+ DockerEngineAPI::Container::NetworkSettings,
3582
+ DockerEngineAPI::Internal::AnyHash
3583
+ )
3584
+ end
3585
+
3586
+ # Information about all networks that the container is connected to.
3587
+ sig do
3588
+ returns(
3589
+ T.nilable(
3590
+ T::Hash[
3591
+ Symbol,
3592
+ DockerEngineAPI::Container::NetworkSettings::Network
3593
+ ]
3594
+ )
3595
+ )
3596
+ end
3597
+ attr_reader :networks
3598
+
3599
+ sig do
3600
+ params(
3601
+ networks:
3602
+ T::Hash[
3603
+ Symbol,
3604
+ DockerEngineAPI::Container::NetworkSettings::Network::OrHash
3605
+ ]
3606
+ ).void
3607
+ end
3608
+ attr_writer :networks
3609
+
3610
+ # PortMap describes the mapping of container ports to host ports, using the
3611
+ # container's port-number and protocol as key in the format `<port>/<protocol>`,
3612
+ # for example, `80/udp`.
3613
+ #
3614
+ # If a container's port is mapped for multiple protocols, separate entries are
3615
+ # added to the mapping table.
3616
+ sig do
3617
+ returns(
3618
+ T.nilable(
3619
+ T::Hash[
3620
+ Symbol,
3621
+ T::Array[DockerEngineAPI::Container::NetworkSettings::Port]
3622
+ ]
3623
+ )
3624
+ )
3625
+ end
3626
+ attr_reader :ports
3627
+
3628
+ sig do
3629
+ params(
3630
+ ports:
3631
+ T::Hash[
3632
+ Symbol,
3633
+ T::Array[
3634
+ DockerEngineAPI::Container::NetworkSettings::Port::OrHash
3635
+ ]
3636
+ ]
3637
+ ).void
3638
+ end
3639
+ attr_writer :ports
3640
+
3641
+ # SandboxID uniquely represents a container's network stack.
3642
+ sig { returns(T.nilable(String)) }
3643
+ attr_reader :sandbox_id
3644
+
3645
+ sig { params(sandbox_id: String).void }
3646
+ attr_writer :sandbox_id
3647
+
3648
+ # SandboxKey is the full path of the netns handle
3649
+ sig { returns(T.nilable(String)) }
3650
+ attr_reader :sandbox_key
3651
+
3652
+ sig { params(sandbox_key: String).void }
3653
+ attr_writer :sandbox_key
3654
+
3655
+ # NetworkSettings exposes the network settings in the API
3656
+ sig do
3657
+ params(
3658
+ networks:
3659
+ T::Hash[
3660
+ Symbol,
3661
+ DockerEngineAPI::Container::NetworkSettings::Network::OrHash
3662
+ ],
3663
+ ports:
3664
+ T::Hash[
3665
+ Symbol,
3666
+ T::Array[
3667
+ DockerEngineAPI::Container::NetworkSettings::Port::OrHash
3668
+ ]
3669
+ ],
3670
+ sandbox_id: String,
3671
+ sandbox_key: String
3672
+ ).returns(T.attached_class)
3673
+ end
3674
+ def self.new(
3675
+ # Information about all networks that the container is connected to.
3676
+ networks: nil,
3677
+ # PortMap describes the mapping of container ports to host ports, using the
3678
+ # container's port-number and protocol as key in the format `<port>/<protocol>`,
3679
+ # for example, `80/udp`.
3680
+ #
3681
+ # If a container's port is mapped for multiple protocols, separate entries are
3682
+ # added to the mapping table.
3683
+ ports: nil,
3684
+ # SandboxID uniquely represents a container's network stack.
3685
+ sandbox_id: nil,
3686
+ # SandboxKey is the full path of the netns handle
3687
+ sandbox_key: nil
3688
+ )
3689
+ end
3690
+
3691
+ sig do
3692
+ override.returns(
3693
+ {
3694
+ networks:
3695
+ T::Hash[
3696
+ Symbol,
3697
+ DockerEngineAPI::Container::NetworkSettings::Network
3698
+ ],
3699
+ ports:
3700
+ T::Hash[
3701
+ Symbol,
3702
+ T::Array[DockerEngineAPI::Container::NetworkSettings::Port]
3703
+ ],
3704
+ sandbox_id: String,
3705
+ sandbox_key: String
3706
+ }
3707
+ )
3708
+ end
3709
+ def to_hash
3710
+ end
3711
+
3712
+ class Network < DockerEngineAPI::Internal::Type::BaseModel
3713
+ OrHash =
3714
+ T.type_alias do
3715
+ T.any(
3716
+ DockerEngineAPI::Container::NetworkSettings::Network,
3717
+ DockerEngineAPI::Internal::AnyHash
3718
+ )
3719
+ end
3720
+
3721
+ sig { returns(T.nilable(T::Array[String])) }
3722
+ attr_reader :aliases
3723
+
3724
+ sig { params(aliases: T::Array[String]).void }
3725
+ attr_writer :aliases
3726
+
3727
+ # List of all DNS names an endpoint has on a specific network. This list is based
3728
+ # on the container name, network aliases, container short ID, and hostname.
3729
+ #
3730
+ # These DNS names are non-fully qualified but can contain several dots. You can
3731
+ # get fully qualified DNS names by appending `.<network-name>`. For instance, if
3732
+ # container name is `my.ctr` and the network is named `testnet`, `DNSNames` will
3733
+ # contain `my.ctr` and the FQDN will be `my.ctr.testnet`.
3734
+ sig { returns(T.nilable(T::Array[String])) }
3735
+ attr_reader :dns_names
3736
+
3737
+ sig { params(dns_names: T::Array[String]).void }
3738
+ attr_writer :dns_names
3739
+
3740
+ # DriverOpts is a mapping of driver options and values. These options are passed
3741
+ # directly to the driver and are driver specific.
3742
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
3743
+ attr_accessor :driver_opts
3744
+
3745
+ # Unique ID for the service endpoint in a Sandbox.
3746
+ sig { returns(T.nilable(String)) }
3747
+ attr_reader :endpoint_id
3748
+
3749
+ sig { params(endpoint_id: String).void }
3750
+ attr_writer :endpoint_id
3751
+
3752
+ # Gateway address for this network.
3753
+ sig { returns(T.nilable(String)) }
3754
+ attr_reader :gateway
3755
+
3756
+ sig { params(gateway: String).void }
3757
+ attr_writer :gateway
3758
+
3759
+ # Global IPv6 address.
3760
+ sig { returns(T.nilable(String)) }
3761
+ attr_reader :global_i_pv6_address
3762
+
3763
+ sig { params(global_i_pv6_address: String).void }
3764
+ attr_writer :global_i_pv6_address
3765
+
3766
+ # Mask length of the global IPv6 address.
3767
+ sig { returns(T.nilable(Integer)) }
3768
+ attr_reader :global_i_pv6_prefix_len
3769
+
3770
+ sig { params(global_i_pv6_prefix_len: Integer).void }
3771
+ attr_writer :global_i_pv6_prefix_len
3772
+
3773
+ # This property determines which endpoint will provide the default gateway for a
3774
+ # container. The endpoint with the highest priority will be used. If multiple
3775
+ # endpoints have the same priority, endpoints are lexicographically sorted based
3776
+ # on their network name, and the one that sorts first is picked.
3777
+ sig { returns(T.nilable(Integer)) }
3778
+ attr_reader :gw_priority
3779
+
3780
+ sig { params(gw_priority: Integer).void }
3781
+ attr_writer :gw_priority
3782
+
3783
+ # IPv4 address.
3784
+ sig { returns(T.nilable(String)) }
3785
+ attr_reader :ip_address
3786
+
3787
+ sig { params(ip_address: String).void }
3788
+ attr_writer :ip_address
3789
+
3790
+ # EndpointIPAMConfig represents an endpoint's IPAM configuration.
3791
+ sig do
3792
+ returns(
3793
+ T.nilable(
3794
+ DockerEngineAPI::Container::NetworkSettings::Network::IpamConfig
3795
+ )
3796
+ )
3797
+ end
3798
+ attr_reader :ipam_config
3799
+
3800
+ sig do
3801
+ params(
3802
+ ipam_config:
3803
+ T.nilable(
3804
+ DockerEngineAPI::Container::NetworkSettings::Network::IpamConfig::OrHash
3805
+ )
3806
+ ).void
3807
+ end
3808
+ attr_writer :ipam_config
3809
+
3810
+ # Mask length of the IPv4 address.
3811
+ sig { returns(T.nilable(Integer)) }
3812
+ attr_reader :ip_prefix_len
3813
+
3814
+ sig { params(ip_prefix_len: Integer).void }
3815
+ attr_writer :ip_prefix_len
3816
+
3817
+ # IPv6 gateway address.
3818
+ sig { returns(T.nilable(String)) }
3819
+ attr_reader :i_pv6_gateway
3820
+
3821
+ sig { params(i_pv6_gateway: String).void }
3822
+ attr_writer :i_pv6_gateway
3823
+
3824
+ sig { returns(T.nilable(T::Array[String])) }
3825
+ attr_reader :links
3826
+
3827
+ sig { params(links: T::Array[String]).void }
3828
+ attr_writer :links
3829
+
3830
+ # MAC address for the endpoint on this network. The network driver might ignore
3831
+ # this parameter.
3832
+ sig { returns(T.nilable(String)) }
3833
+ attr_reader :mac_address
3834
+
3835
+ sig { params(mac_address: String).void }
3836
+ attr_writer :mac_address
3837
+
3838
+ # Unique ID of the network.
3839
+ sig { returns(T.nilable(String)) }
3840
+ attr_reader :network_id
3841
+
3842
+ sig { params(network_id: String).void }
3843
+ attr_writer :network_id
3844
+
3845
+ # Configuration for a network endpoint.
3846
+ sig do
3847
+ params(
3848
+ aliases: T::Array[String],
3849
+ dns_names: T::Array[String],
3850
+ driver_opts: T.nilable(T::Hash[Symbol, String]),
3851
+ endpoint_id: String,
3852
+ gateway: String,
3853
+ global_i_pv6_address: String,
3854
+ global_i_pv6_prefix_len: Integer,
3855
+ gw_priority: Integer,
3856
+ ip_address: String,
3857
+ ipam_config:
3858
+ T.nilable(
3859
+ DockerEngineAPI::Container::NetworkSettings::Network::IpamConfig::OrHash
3860
+ ),
3861
+ ip_prefix_len: Integer,
3862
+ i_pv6_gateway: String,
3863
+ links: T::Array[String],
3864
+ mac_address: String,
3865
+ network_id: String
3866
+ ).returns(T.attached_class)
3867
+ end
3868
+ def self.new(
3869
+ aliases: nil,
3870
+ # List of all DNS names an endpoint has on a specific network. This list is based
3871
+ # on the container name, network aliases, container short ID, and hostname.
3872
+ #
3873
+ # These DNS names are non-fully qualified but can contain several dots. You can
3874
+ # get fully qualified DNS names by appending `.<network-name>`. For instance, if
3875
+ # container name is `my.ctr` and the network is named `testnet`, `DNSNames` will
3876
+ # contain `my.ctr` and the FQDN will be `my.ctr.testnet`.
3877
+ dns_names: nil,
3878
+ # DriverOpts is a mapping of driver options and values. These options are passed
3879
+ # directly to the driver and are driver specific.
3880
+ driver_opts: nil,
3881
+ # Unique ID for the service endpoint in a Sandbox.
3882
+ endpoint_id: nil,
3883
+ # Gateway address for this network.
3884
+ gateway: nil,
3885
+ # Global IPv6 address.
3886
+ global_i_pv6_address: nil,
3887
+ # Mask length of the global IPv6 address.
3888
+ global_i_pv6_prefix_len: nil,
3889
+ # This property determines which endpoint will provide the default gateway for a
3890
+ # container. The endpoint with the highest priority will be used. If multiple
3891
+ # endpoints have the same priority, endpoints are lexicographically sorted based
3892
+ # on their network name, and the one that sorts first is picked.
3893
+ gw_priority: nil,
3894
+ # IPv4 address.
3895
+ ip_address: nil,
3896
+ # EndpointIPAMConfig represents an endpoint's IPAM configuration.
3897
+ ipam_config: nil,
3898
+ # Mask length of the IPv4 address.
3899
+ ip_prefix_len: nil,
3900
+ # IPv6 gateway address.
3901
+ i_pv6_gateway: nil,
3902
+ links: nil,
3903
+ # MAC address for the endpoint on this network. The network driver might ignore
3904
+ # this parameter.
3905
+ mac_address: nil,
3906
+ # Unique ID of the network.
3907
+ network_id: nil
3908
+ )
3909
+ end
3910
+
3911
+ sig do
3912
+ override.returns(
3913
+ {
3914
+ aliases: T::Array[String],
3915
+ dns_names: T::Array[String],
3916
+ driver_opts: T.nilable(T::Hash[Symbol, String]),
3917
+ endpoint_id: String,
3918
+ gateway: String,
3919
+ global_i_pv6_address: String,
3920
+ global_i_pv6_prefix_len: Integer,
3921
+ gw_priority: Integer,
3922
+ ip_address: String,
3923
+ ipam_config:
3924
+ T.nilable(
3925
+ DockerEngineAPI::Container::NetworkSettings::Network::IpamConfig
3926
+ ),
3927
+ ip_prefix_len: Integer,
3928
+ i_pv6_gateway: String,
3929
+ links: T::Array[String],
3930
+ mac_address: String,
3931
+ network_id: String
3932
+ }
3933
+ )
3934
+ end
3935
+ def to_hash
3936
+ end
3937
+
3938
+ class IpamConfig < DockerEngineAPI::Internal::Type::BaseModel
3939
+ OrHash =
3940
+ T.type_alias do
3941
+ T.any(
3942
+ DockerEngineAPI::Container::NetworkSettings::Network::IpamConfig,
3943
+ DockerEngineAPI::Internal::AnyHash
3944
+ )
3945
+ end
3946
+
3947
+ sig { returns(T.nilable(String)) }
3948
+ attr_reader :i_pv4_address
3949
+
3950
+ sig { params(i_pv4_address: String).void }
3951
+ attr_writer :i_pv4_address
3952
+
3953
+ sig { returns(T.nilable(String)) }
3954
+ attr_reader :i_pv6_address
3955
+
3956
+ sig { params(i_pv6_address: String).void }
3957
+ attr_writer :i_pv6_address
3958
+
3959
+ sig { returns(T.nilable(T::Array[String])) }
3960
+ attr_reader :link_local_ips
3961
+
3962
+ sig { params(link_local_ips: T::Array[String]).void }
3963
+ attr_writer :link_local_ips
3964
+
3965
+ # EndpointIPAMConfig represents an endpoint's IPAM configuration.
3966
+ sig do
3967
+ params(
3968
+ i_pv4_address: String,
3969
+ i_pv6_address: String,
3970
+ link_local_ips: T::Array[String]
3971
+ ).returns(T.attached_class)
3972
+ end
3973
+ def self.new(
3974
+ i_pv4_address: nil,
3975
+ i_pv6_address: nil,
3976
+ link_local_ips: nil
3977
+ )
3978
+ end
3979
+
3980
+ sig do
3981
+ override.returns(
3982
+ {
3983
+ i_pv4_address: String,
3984
+ i_pv6_address: String,
3985
+ link_local_ips: T::Array[String]
3986
+ }
3987
+ )
3988
+ end
3989
+ def to_hash
3990
+ end
3991
+ end
3992
+ end
3993
+
3994
+ class Port < DockerEngineAPI::Internal::Type::BaseModel
3995
+ OrHash =
3996
+ T.type_alias do
3997
+ T.any(
3998
+ DockerEngineAPI::Container::NetworkSettings::Port,
3999
+ DockerEngineAPI::Internal::AnyHash
4000
+ )
4001
+ end
4002
+
4003
+ # Host IP address that the container's port is mapped to.
4004
+ sig { returns(T.nilable(String)) }
4005
+ attr_reader :host_ip
4006
+
4007
+ sig { params(host_ip: String).void }
4008
+ attr_writer :host_ip
4009
+
4010
+ # Host port number that the container's port is mapped to.
4011
+ sig { returns(T.nilable(String)) }
4012
+ attr_reader :host_port
4013
+
4014
+ sig { params(host_port: String).void }
4015
+ attr_writer :host_port
4016
+
4017
+ # PortBinding represents a binding between a host IP address and a host port.
4018
+ sig do
4019
+ params(host_ip: String, host_port: String).returns(T.attached_class)
4020
+ end
4021
+ def self.new(
4022
+ # Host IP address that the container's port is mapped to.
4023
+ host_ip: nil,
4024
+ # Host port number that the container's port is mapped to.
4025
+ host_port: nil
4026
+ )
4027
+ end
4028
+
4029
+ sig { override.returns({ host_ip: String, host_port: String }) }
4030
+ def to_hash
4031
+ end
4032
+ end
4033
+ end
4034
+
4035
+ class State < DockerEngineAPI::Internal::Type::BaseModel
4036
+ OrHash =
4037
+ T.type_alias do
4038
+ T.any(
4039
+ DockerEngineAPI::Container::State,
4040
+ DockerEngineAPI::Internal::AnyHash
4041
+ )
4042
+ end
4043
+
4044
+ sig { returns(T.nilable(T::Boolean)) }
4045
+ attr_reader :dead
4046
+
4047
+ sig { params(dead: T::Boolean).void }
4048
+ attr_writer :dead
4049
+
4050
+ sig { returns(T.nilable(String)) }
4051
+ attr_reader :error
4052
+
4053
+ sig { params(error: String).void }
4054
+ attr_writer :error
4055
+
4056
+ # The last exit code of this container
4057
+ sig { returns(T.nilable(Integer)) }
4058
+ attr_reader :exit_code
4059
+
4060
+ sig { params(exit_code: Integer).void }
4061
+ attr_writer :exit_code
4062
+
4063
+ # The time when this container last exited.
4064
+ sig { returns(T.nilable(String)) }
4065
+ attr_reader :finished_at
4066
+
4067
+ sig { params(finished_at: String).void }
4068
+ attr_writer :finished_at
4069
+
4070
+ # Health stores information about the container's healthcheck results.
4071
+ sig { returns(T.nilable(DockerEngineAPI::Container::State::Health)) }
4072
+ attr_reader :health
4073
+
4074
+ sig do
4075
+ params(
4076
+ health: T.nilable(DockerEngineAPI::Container::State::Health::OrHash)
4077
+ ).void
4078
+ end
4079
+ attr_writer :health
4080
+
4081
+ # Whether a process within this container has been killed because it ran out of
4082
+ # memory since the container was last started.
4083
+ sig { returns(T.nilable(T::Boolean)) }
4084
+ attr_reader :oom_killed
4085
+
4086
+ sig { params(oom_killed: T::Boolean).void }
4087
+ attr_writer :oom_killed
4088
+
4089
+ # Whether this container is paused.
4090
+ sig { returns(T.nilable(T::Boolean)) }
4091
+ attr_reader :paused
4092
+
4093
+ sig { params(paused: T::Boolean).void }
4094
+ attr_writer :paused
4095
+
4096
+ # The process ID of this container
4097
+ sig { returns(T.nilable(Integer)) }
4098
+ attr_reader :pid
4099
+
4100
+ sig { params(pid: Integer).void }
4101
+ attr_writer :pid
4102
+
4103
+ # Whether this container is restarting.
4104
+ sig { returns(T.nilable(T::Boolean)) }
4105
+ attr_reader :restarting
4106
+
4107
+ sig { params(restarting: T::Boolean).void }
4108
+ attr_writer :restarting
4109
+
4110
+ # Whether this container is running.
4111
+ #
4112
+ # Note that a running container can be _paused_. The `Running` and `Paused`
4113
+ # booleans are not mutually exclusive:
4114
+ #
4115
+ # When pausing a container (on Linux), the freezer cgroup is used to suspend all
4116
+ # processes in the container. Freezing the process requires the process to be
4117
+ # running. As a result, paused containers are both `Running` _and_ `Paused`.
4118
+ #
4119
+ # Use the `Status` field instead to determine if a container's state is "running".
4120
+ sig { returns(T.nilable(T::Boolean)) }
4121
+ attr_reader :running
4122
+
4123
+ sig { params(running: T::Boolean).void }
4124
+ attr_writer :running
4125
+
4126
+ # The time when this container was last started.
4127
+ sig { returns(T.nilable(String)) }
4128
+ attr_reader :started_at
4129
+
4130
+ sig { params(started_at: String).void }
4131
+ attr_writer :started_at
4132
+
4133
+ # String representation of the container state. Can be one of "created",
4134
+ # "running", "paused", "restarting", "removing", "exited", or "dead".
4135
+ sig do
4136
+ returns(
4137
+ T.nilable(DockerEngineAPI::Container::State::Status::TaggedSymbol)
4138
+ )
4139
+ end
4140
+ attr_reader :status
4141
+
4142
+ sig do
4143
+ params(
4144
+ status: DockerEngineAPI::Container::State::Status::OrSymbol
4145
+ ).void
4146
+ end
4147
+ attr_writer :status
4148
+
4149
+ # ContainerState stores container's running state. It's part of ContainerJSONBase
4150
+ # and will be returned by the "inspect" command.
4151
+ sig do
4152
+ params(
4153
+ dead: T::Boolean,
4154
+ error: String,
4155
+ exit_code: Integer,
4156
+ finished_at: String,
4157
+ health:
4158
+ T.nilable(DockerEngineAPI::Container::State::Health::OrHash),
4159
+ oom_killed: T::Boolean,
4160
+ paused: T::Boolean,
4161
+ pid: Integer,
4162
+ restarting: T::Boolean,
4163
+ running: T::Boolean,
4164
+ started_at: String,
4165
+ status: DockerEngineAPI::Container::State::Status::OrSymbol
4166
+ ).returns(T.attached_class)
4167
+ end
4168
+ def self.new(
4169
+ dead: nil,
4170
+ error: nil,
4171
+ # The last exit code of this container
4172
+ exit_code: nil,
4173
+ # The time when this container last exited.
4174
+ finished_at: nil,
4175
+ # Health stores information about the container's healthcheck results.
4176
+ health: nil,
4177
+ # Whether a process within this container has been killed because it ran out of
4178
+ # memory since the container was last started.
4179
+ oom_killed: nil,
4180
+ # Whether this container is paused.
4181
+ paused: nil,
4182
+ # The process ID of this container
4183
+ pid: nil,
4184
+ # Whether this container is restarting.
4185
+ restarting: nil,
4186
+ # Whether this container is running.
4187
+ #
4188
+ # Note that a running container can be _paused_. The `Running` and `Paused`
4189
+ # booleans are not mutually exclusive:
4190
+ #
4191
+ # When pausing a container (on Linux), the freezer cgroup is used to suspend all
4192
+ # processes in the container. Freezing the process requires the process to be
4193
+ # running. As a result, paused containers are both `Running` _and_ `Paused`.
4194
+ #
4195
+ # Use the `Status` field instead to determine if a container's state is "running".
4196
+ running: nil,
4197
+ # The time when this container was last started.
4198
+ started_at: nil,
4199
+ # String representation of the container state. Can be one of "created",
4200
+ # "running", "paused", "restarting", "removing", "exited", or "dead".
4201
+ status: nil
4202
+ )
4203
+ end
4204
+
4205
+ sig do
4206
+ override.returns(
4207
+ {
4208
+ dead: T::Boolean,
4209
+ error: String,
4210
+ exit_code: Integer,
4211
+ finished_at: String,
4212
+ health: T.nilable(DockerEngineAPI::Container::State::Health),
4213
+ oom_killed: T::Boolean,
4214
+ paused: T::Boolean,
4215
+ pid: Integer,
4216
+ restarting: T::Boolean,
4217
+ running: T::Boolean,
4218
+ started_at: String,
4219
+ status: DockerEngineAPI::Container::State::Status::TaggedSymbol
4220
+ }
4221
+ )
4222
+ end
4223
+ def to_hash
4224
+ end
4225
+
4226
+ class Health < DockerEngineAPI::Internal::Type::BaseModel
4227
+ OrHash =
4228
+ T.type_alias do
4229
+ T.any(
4230
+ DockerEngineAPI::Container::State::Health,
4231
+ DockerEngineAPI::Internal::AnyHash
4232
+ )
4233
+ end
4234
+
4235
+ # FailingStreak is the number of consecutive failures
4236
+ sig { returns(T.nilable(Integer)) }
4237
+ attr_reader :failing_streak
4238
+
4239
+ sig { params(failing_streak: Integer).void }
4240
+ attr_writer :failing_streak
4241
+
4242
+ # Log contains the last few results (oldest first)
4243
+ sig do
4244
+ returns(
4245
+ T.nilable(
4246
+ T::Array[
4247
+ T.nilable(DockerEngineAPI::Container::State::Health::Log)
4248
+ ]
4249
+ )
4250
+ )
4251
+ end
4252
+ attr_reader :log
4253
+
4254
+ sig do
4255
+ params(
4256
+ log:
4257
+ T::Array[
4258
+ T.nilable(
4259
+ DockerEngineAPI::Container::State::Health::Log::OrHash
4260
+ )
4261
+ ]
4262
+ ).void
4263
+ end
4264
+ attr_writer :log
4265
+
4266
+ # Status is one of `none`, `starting`, `healthy` or `unhealthy`
4267
+ #
4268
+ # - "none" Indicates there is no healthcheck
4269
+ # - "starting" Starting indicates that the container is not yet ready
4270
+ # - "healthy" Healthy indicates that the container is running correctly
4271
+ # - "unhealthy" Unhealthy indicates that the container has a problem
4272
+ sig do
4273
+ returns(
4274
+ T.nilable(
4275
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4276
+ )
4277
+ )
4278
+ end
4279
+ attr_reader :status
4280
+
4281
+ sig do
4282
+ params(
4283
+ status:
4284
+ DockerEngineAPI::Container::State::Health::Status::OrSymbol
4285
+ ).void
4286
+ end
4287
+ attr_writer :status
4288
+
4289
+ # Health stores information about the container's healthcheck results.
4290
+ sig do
4291
+ params(
4292
+ failing_streak: Integer,
4293
+ log:
4294
+ T::Array[
4295
+ T.nilable(
4296
+ DockerEngineAPI::Container::State::Health::Log::OrHash
4297
+ )
4298
+ ],
4299
+ status:
4300
+ DockerEngineAPI::Container::State::Health::Status::OrSymbol
4301
+ ).returns(T.attached_class)
4302
+ end
4303
+ def self.new(
4304
+ # FailingStreak is the number of consecutive failures
4305
+ failing_streak: nil,
4306
+ # Log contains the last few results (oldest first)
4307
+ log: nil,
4308
+ # Status is one of `none`, `starting`, `healthy` or `unhealthy`
4309
+ #
4310
+ # - "none" Indicates there is no healthcheck
4311
+ # - "starting" Starting indicates that the container is not yet ready
4312
+ # - "healthy" Healthy indicates that the container is running correctly
4313
+ # - "unhealthy" Unhealthy indicates that the container has a problem
4314
+ status: nil
4315
+ )
4316
+ end
4317
+
4318
+ sig do
4319
+ override.returns(
4320
+ {
4321
+ failing_streak: Integer,
4322
+ log:
4323
+ T::Array[
4324
+ T.nilable(DockerEngineAPI::Container::State::Health::Log)
4325
+ ],
4326
+ status:
4327
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4328
+ }
4329
+ )
4330
+ end
4331
+ def to_hash
4332
+ end
4333
+
4334
+ class Log < DockerEngineAPI::Internal::Type::BaseModel
4335
+ OrHash =
4336
+ T.type_alias do
4337
+ T.any(
4338
+ DockerEngineAPI::Container::State::Health::Log,
4339
+ DockerEngineAPI::Internal::AnyHash
4340
+ )
4341
+ end
4342
+
4343
+ # Date and time at which this check ended in
4344
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
4345
+ sig { returns(T.nilable(String)) }
4346
+ attr_reader :end_
4347
+
4348
+ sig { params(end_: String).void }
4349
+ attr_writer :end_
4350
+
4351
+ # ExitCode meanings:
4352
+ #
4353
+ # - `0` healthy
4354
+ # - `1` unhealthy
4355
+ # - `2` reserved (considered unhealthy)
4356
+ # - other values: error running probe
4357
+ sig { returns(T.nilable(Integer)) }
4358
+ attr_reader :exit_code
4359
+
4360
+ sig { params(exit_code: Integer).void }
4361
+ attr_writer :exit_code
4362
+
4363
+ # Output from last check
4364
+ sig { returns(T.nilable(String)) }
4365
+ attr_reader :output
4366
+
4367
+ sig { params(output: String).void }
4368
+ attr_writer :output
4369
+
4370
+ # Date and time at which this check started in
4371
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
4372
+ sig { returns(T.nilable(Time)) }
4373
+ attr_reader :start
4374
+
4375
+ sig { params(start: Time).void }
4376
+ attr_writer :start
4377
+
4378
+ # HealthcheckResult stores information about a single run of a healthcheck probe
4379
+ sig do
4380
+ params(
4381
+ end_: String,
4382
+ exit_code: Integer,
4383
+ output: String,
4384
+ start: Time
4385
+ ).returns(T.attached_class)
4386
+ end
4387
+ def self.new(
4388
+ # Date and time at which this check ended in
4389
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
4390
+ end_: nil,
4391
+ # ExitCode meanings:
4392
+ #
4393
+ # - `0` healthy
4394
+ # - `1` unhealthy
4395
+ # - `2` reserved (considered unhealthy)
4396
+ # - other values: error running probe
4397
+ exit_code: nil,
4398
+ # Output from last check
4399
+ output: nil,
4400
+ # Date and time at which this check started in
4401
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
4402
+ start: nil
4403
+ )
4404
+ end
4405
+
4406
+ sig do
4407
+ override.returns(
4408
+ {
4409
+ end_: String,
4410
+ exit_code: Integer,
4411
+ output: String,
4412
+ start: Time
4413
+ }
4414
+ )
4415
+ end
4416
+ def to_hash
4417
+ end
4418
+ end
4419
+
4420
+ # Status is one of `none`, `starting`, `healthy` or `unhealthy`
4421
+ #
4422
+ # - "none" Indicates there is no healthcheck
4423
+ # - "starting" Starting indicates that the container is not yet ready
4424
+ # - "healthy" Healthy indicates that the container is running correctly
4425
+ # - "unhealthy" Unhealthy indicates that the container has a problem
4426
+ module Status
4427
+ extend DockerEngineAPI::Internal::Type::Enum
4428
+
4429
+ TaggedSymbol =
4430
+ T.type_alias do
4431
+ T.all(Symbol, DockerEngineAPI::Container::State::Health::Status)
4432
+ end
4433
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4434
+
4435
+ NONE =
4436
+ T.let(
4437
+ :none,
4438
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4439
+ )
4440
+ STARTING =
4441
+ T.let(
4442
+ :starting,
4443
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4444
+ )
4445
+ HEALTHY =
4446
+ T.let(
4447
+ :healthy,
4448
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4449
+ )
4450
+ UNHEALTHY =
4451
+ T.let(
4452
+ :unhealthy,
4453
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4454
+ )
4455
+
4456
+ sig do
4457
+ override.returns(
4458
+ T::Array[
4459
+ DockerEngineAPI::Container::State::Health::Status::TaggedSymbol
4460
+ ]
4461
+ )
4462
+ end
4463
+ def self.values
4464
+ end
4465
+ end
4466
+ end
4467
+
4468
+ # String representation of the container state. Can be one of "created",
4469
+ # "running", "paused", "restarting", "removing", "exited", or "dead".
4470
+ module Status
4471
+ extend DockerEngineAPI::Internal::Type::Enum
4472
+
4473
+ TaggedSymbol =
4474
+ T.type_alias do
4475
+ T.all(Symbol, DockerEngineAPI::Container::State::Status)
4476
+ end
4477
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4478
+
4479
+ CREATED =
4480
+ T.let(
4481
+ :created,
4482
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4483
+ )
4484
+ RUNNING =
4485
+ T.let(
4486
+ :running,
4487
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4488
+ )
4489
+ PAUSED =
4490
+ T.let(
4491
+ :paused,
4492
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4493
+ )
4494
+ RESTARTING =
4495
+ T.let(
4496
+ :restarting,
4497
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4498
+ )
4499
+ REMOVING =
4500
+ T.let(
4501
+ :removing,
4502
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4503
+ )
4504
+ EXITED =
4505
+ T.let(
4506
+ :exited,
4507
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4508
+ )
4509
+ DEAD =
4510
+ T.let(
4511
+ :dead,
4512
+ DockerEngineAPI::Container::State::Status::TaggedSymbol
4513
+ )
4514
+
4515
+ sig do
4516
+ override.returns(
4517
+ T::Array[DockerEngineAPI::Container::State::Status::TaggedSymbol]
4518
+ )
4519
+ end
4520
+ def self.values
4521
+ end
4522
+ end
4523
+ end
4524
+
4525
+ class Storage < DockerEngineAPI::Internal::Type::BaseModel
4526
+ OrHash =
4527
+ T.type_alias do
4528
+ T.any(
4529
+ DockerEngineAPI::Container::Storage,
4530
+ DockerEngineAPI::Internal::AnyHash
4531
+ )
4532
+ end
4533
+
4534
+ # Information about the storage used for the container's root filesystem.
4535
+ sig { returns(T.nilable(DockerEngineAPI::Container::Storage::RootFs)) }
4536
+ attr_reader :root_fs
4537
+
4538
+ sig do
4539
+ params(
4540
+ root_fs: DockerEngineAPI::Container::Storage::RootFs::OrHash
4541
+ ).void
4542
+ end
4543
+ attr_writer :root_fs
4544
+
4545
+ # Information about the storage used by the container.
4546
+ sig do
4547
+ params(
4548
+ root_fs: DockerEngineAPI::Container::Storage::RootFs::OrHash
4549
+ ).returns(T.attached_class)
4550
+ end
4551
+ def self.new(
4552
+ # Information about the storage used for the container's root filesystem.
4553
+ root_fs: nil
4554
+ )
4555
+ end
4556
+
4557
+ sig do
4558
+ override.returns(
4559
+ { root_fs: DockerEngineAPI::Container::Storage::RootFs }
4560
+ )
4561
+ end
4562
+ def to_hash
4563
+ end
4564
+
4565
+ class RootFs < DockerEngineAPI::Internal::Type::BaseModel
4566
+ OrHash =
4567
+ T.type_alias do
4568
+ T.any(
4569
+ DockerEngineAPI::Container::Storage::RootFs,
4570
+ DockerEngineAPI::Internal::AnyHash
4571
+ )
4572
+ end
4573
+
4574
+ # Information about a snapshot backend of the container's root filesystem.
4575
+ sig do
4576
+ returns(
4577
+ T.nilable(DockerEngineAPI::Container::Storage::RootFs::Snapshot)
4578
+ )
4579
+ end
4580
+ attr_reader :snapshot
4581
+
4582
+ sig do
4583
+ params(
4584
+ snapshot:
4585
+ DockerEngineAPI::Container::Storage::RootFs::Snapshot::OrHash
4586
+ ).void
4587
+ end
4588
+ attr_writer :snapshot
4589
+
4590
+ # Information about the storage used for the container's root filesystem.
4591
+ sig do
4592
+ params(
4593
+ snapshot:
4594
+ DockerEngineAPI::Container::Storage::RootFs::Snapshot::OrHash
4595
+ ).returns(T.attached_class)
4596
+ end
4597
+ def self.new(
4598
+ # Information about a snapshot backend of the container's root filesystem.
4599
+ snapshot: nil
4600
+ )
4601
+ end
4602
+
4603
+ sig do
4604
+ override.returns(
4605
+ {
4606
+ snapshot: DockerEngineAPI::Container::Storage::RootFs::Snapshot
4607
+ }
4608
+ )
4609
+ end
4610
+ def to_hash
4611
+ end
4612
+
4613
+ class Snapshot < DockerEngineAPI::Internal::Type::BaseModel
4614
+ OrHash =
4615
+ T.type_alias do
4616
+ T.any(
4617
+ DockerEngineAPI::Container::Storage::RootFs::Snapshot,
4618
+ DockerEngineAPI::Internal::AnyHash
4619
+ )
4620
+ end
4621
+
4622
+ # Name of the snapshotter.
4623
+ sig { returns(T.nilable(String)) }
4624
+ attr_reader :name
4625
+
4626
+ sig { params(name: String).void }
4627
+ attr_writer :name
4628
+
4629
+ # Information about a snapshot backend of the container's root filesystem.
4630
+ sig { params(name: String).returns(T.attached_class) }
4631
+ def self.new(
4632
+ # Name of the snapshotter.
4633
+ name: nil
4634
+ )
4635
+ end
4636
+
4637
+ sig { override.returns({ name: String }) }
4638
+ def to_hash
4639
+ end
4640
+ end
4641
+ end
4642
+ end
4643
+ end
4644
+ end
4645
+ end