docker-engine-ruby 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/docker_engine_ruby/models/config.rb +6 -6
- data/lib/docker_engine_ruby/models/config_create_params.rb +1 -11
- data/lib/docker_engine_ruby/models/config_list_params.rb +1 -14
- data/lib/docker_engine_ruby/models/config_list_response.rb +1 -1
- data/lib/docker_engine_ruby/models/config_object.rb +77 -0
- data/lib/docker_engine_ruby/models/config_spec.rb +68 -0
- data/lib/docker_engine_ruby/models/config_update_params.rb +1 -7
- data/lib/docker_engine_ruby/models/connect_request.rb +5 -5
- data/lib/docker_engine_ruby/models/container.rb +61 -143
- data/lib/docker_engine_ruby/models/container_archive_params.rb +1 -3
- data/lib/docker_engine_ruby/models/container_attach_params.rb +6 -29
- data/lib/docker_engine_ruby/models/container_create_params.rb +3 -1701
- data/lib/docker_engine_ruby/models/container_delete_params.rb +3 -9
- data/lib/docker_engine_ruby/models/container_exec_params.rb +11 -39
- data/lib/docker_engine_ruby/models/container_inspect_params.rb +1 -3
- data/lib/docker_engine_ruby/models/container_kill_params.rb +1 -6
- data/lib/docker_engine_ruby/models/container_list_params.rb +4 -36
- data/lib/docker_engine_ruby/models/container_logs_params.rb +7 -25
- data/lib/docker_engine_ruby/models/container_prune_params.rb +1 -16
- data/lib/docker_engine_ruby/models/container_prune_response.rb +2 -5
- data/lib/docker_engine_ruby/models/container_rename_params.rb +1 -3
- data/lib/docker_engine_ruby/models/container_resize_params.rb +2 -6
- data/lib/docker_engine_ruby/models/container_restart_params.rb +2 -9
- data/lib/docker_engine_ruby/models/container_start_params.rb +1 -8
- data/lib/docker_engine_ruby/models/container_stats_params.rb +2 -11
- data/lib/docker_engine_ruby/models/container_stop_params.rb +2 -9
- data/lib/docker_engine_ruby/models/container_top_params.rb +1 -3
- data/lib/docker_engine_ruby/models/container_update_params.rb +4 -80
- data/lib/docker_engine_ruby/models/container_wait_params.rb +1 -11
- data/lib/docker_engine_ruby/models/create_request.rb +17 -121
- data/lib/docker_engine_ruby/models/exec_inspect_response.rb +1 -12
- data/lib/docker_engine_ruby/models/exec_resize_params.rb +2 -6
- data/lib/docker_engine_ruby/models/exec_start_params.rb +3 -9
- data/lib/docker_engine_ruby/models/filesystem_change.rb +3 -3
- data/lib/docker_engine_ruby/models/image.rb +33 -66
- data/lib/docker_engine_ruby/models/image_build_params.rb +25 -122
- data/lib/docker_engine_ruby/models/image_build_prune_params.rb +5 -32
- data/lib/docker_engine_ruby/models/image_build_prune_response.rb +1 -3
- data/lib/docker_engine_ruby/models/image_commit_params.rb +7 -21
- data/lib/docker_engine_ruby/models/image_delete_params.rb +3 -14
- data/lib/docker_engine_ruby/models/image_get_all_params.rb +2 -13
- data/lib/docker_engine_ruby/models/image_get_params.rb +1 -10
- data/lib/docker_engine_ruby/models/image_history_params.rb +1 -15
- data/lib/docker_engine_ruby/models/image_inspect_params.rb +1 -3
- data/lib/docker_engine_ruby/models/image_list_params.rb +5 -29
- data/lib/docker_engine_ruby/models/image_list_response.rb +1 -1
- data/lib/docker_engine_ruby/models/image_load_params.rb +2 -14
- data/lib/docker_engine_ruby/models/image_prune_params.rb +1 -16
- data/lib/docker_engine_ruby/models/image_prune_response.rb +2 -5
- data/lib/docker_engine_ruby/models/image_pull_params.rb +13 -60
- data/lib/docker_engine_ruby/models/image_push_params.rb +2 -19
- data/lib/docker_engine_ruby/models/image_search_params.rb +3 -16
- data/lib/docker_engine_ruby/models/image_search_response.rb +1 -13
- data/lib/docker_engine_ruby/models/image_summary.rb +638 -0
- data/lib/docker_engine_ruby/models/image_tag_params.rb +2 -6
- data/lib/docker_engine_ruby/models/info.rb +27 -56
- data/lib/docker_engine_ruby/models/inspect.rb +5 -7
- data/lib/docker_engine_ruby/models/list_response.rb +0 -3
- data/lib/docker_engine_ruby/models/network.rb +7 -4
- data/lib/docker_engine_ruby/models/network_create_params.rb +11 -26
- data/lib/docker_engine_ruby/models/network_create_response.rb +27 -0
- data/lib/docker_engine_ruby/models/network_inspect_params.rb +2 -6
- data/lib/docker_engine_ruby/models/network_inspect_response.rb +219 -89
- data/lib/docker_engine_ruby/models/network_list_params.rb +1 -21
- data/lib/docker_engine_ruby/models/network_list_response.rb +1 -1
- data/lib/docker_engine_ruby/models/network_prune_params.rb +1 -16
- data/lib/docker_engine_ruby/models/network_prune_response.rb +1 -2
- data/lib/docker_engine_ruby/models/network_summary.rb +260 -0
- data/lib/docker_engine_ruby/models/node.rb +12 -25
- data/lib/docker_engine_ruby/models/node_delete_params.rb +1 -3
- data/lib/docker_engine_ruby/models/node_list_params.rb +1 -15
- data/lib/docker_engine_ruby/models/node_spec.rb +67 -0
- data/lib/docker_engine_ruby/models/node_update_params.rb +1 -7
- data/lib/docker_engine_ruby/models/plugin.rb +2 -24
- data/lib/docker_engine_ruby/models/plugin_create_params.rb +1 -8
- data/lib/docker_engine_ruby/models/plugin_delete_params.rb +1 -7
- data/lib/docker_engine_ruby/models/plugin_disable_params.rb +1 -6
- data/lib/docker_engine_ruby/models/plugin_enable_params.rb +1 -3
- data/lib/docker_engine_ruby/models/plugin_list_params.rb +1 -12
- data/lib/docker_engine_ruby/models/plugin_privileges_params.rb +1 -7
- data/lib/docker_engine_ruby/models/plugin_pull_params.rb +8 -21
- data/lib/docker_engine_ruby/models/plugin_set_params.rb +3 -3
- data/lib/docker_engine_ruby/models/plugin_upgrade_params.rb +4 -13
- data/lib/docker_engine_ruby/models/secret.rb +9 -9
- data/lib/docker_engine_ruby/models/secret_create_params.rb +1 -11
- data/lib/docker_engine_ruby/models/secret_list_params.rb +1 -14
- data/lib/docker_engine_ruby/models/secret_spec.rb +99 -0
- data/lib/docker_engine_ruby/models/secret_update_params.rb +1 -7
- data/lib/docker_engine_ruby/models/service.rb +21 -36
- data/lib/docker_engine_ruby/models/service_create_params.rb +1 -15
- data/lib/docker_engine_ruby/models/service_create_response.rb +32 -0
- data/lib/docker_engine_ruby/models/service_inspect_params.rb +1 -3
- data/lib/docker_engine_ruby/models/service_list_params.rb +2 -17
- data/lib/docker_engine_ruby/models/service_logs_params.rb +7 -25
- data/lib/docker_engine_ruby/models/{spec.rb → service_spec.rb} +93 -158
- data/lib/docker_engine_ruby/models/service_update_params.rb +4 -34
- data/lib/docker_engine_ruby/models/service_update_response.rb +17 -0
- data/lib/docker_engine_ruby/models/stats_response.rb +143 -68
- data/lib/docker_engine_ruby/models/summary.rb +12 -32
- data/lib/docker_engine_ruby/models/swarm.rb +9 -12
- data/lib/docker_engine_ruby/models/swarm_init_params.rb +10 -38
- data/lib/docker_engine_ruby/models/swarm_join_params.rb +5 -31
- data/lib/docker_engine_ruby/models/swarm_leave_params.rb +1 -7
- data/lib/docker_engine_ruby/models/swarm_spec.rb +270 -0
- data/lib/docker_engine_ruby/models/swarm_unlock_key_response.rb +1 -2
- data/lib/docker_engine_ruby/models/swarm_unlock_params.rb +1 -3
- data/lib/docker_engine_ruby/models/swarm_update_params.rb +4 -16
- data/lib/docker_engine_ruby/models/system_data_usage_params.rb +43 -16
- data/lib/docker_engine_ruby/models/system_data_usage_response.rb +0 -19
- data/lib/docker_engine_ruby/models/system_events_params.rb +3 -29
- data/lib/docker_engine_ruby/models/system_events_response.rb +0 -3
- data/lib/docker_engine_ruby/models/task.rb +13 -15
- data/lib/docker_engine_ruby/models/task_list_params.rb +1 -16
- data/lib/docker_engine_ruby/models/task_logs_params.rb +7 -25
- data/lib/docker_engine_ruby/models/task_spec.rb +1439 -0
- data/lib/docker_engine_ruby/models/version.rb +8 -17
- data/lib/docker_engine_ruby/models/volume.rb +38 -194
- data/lib/docker_engine_ruby/models/volume_delete_params.rb +1 -3
- data/lib/docker_engine_ruby/models/volume_list_params.rb +1 -15
- data/lib/docker_engine_ruby/models/volume_prune_params.rb +1 -14
- data/lib/docker_engine_ruby/models/volume_prune_response.rb +2 -5
- data/lib/docker_engine_ruby/models/volume_update_params.rb +18 -127
- data/lib/docker_engine_ruby/models.rb +23 -1
- data/lib/docker_engine_ruby/resources/auth.rb +1 -2
- data/lib/docker_engine_ruby/resources/configs.rb +14 -23
- data/lib/docker_engine_ruby/resources/containers.rb +88 -337
- data/lib/docker_engine_ruby/resources/distribution.rb +2 -3
- data/lib/docker_engine_ruby/resources/exec.rb +11 -22
- data/lib/docker_engine_ruby/resources/images.rb +100 -230
- data/lib/docker_engine_ruby/resources/networks.rb +26 -45
- data/lib/docker_engine_ruby/resources/nodes.rb +8 -18
- data/lib/docker_engine_ruby/resources/plugins.rb +27 -74
- data/lib/docker_engine_ruby/resources/secrets.rb +10 -19
- data/lib/docker_engine_ruby/resources/services.rb +27 -56
- data/lib/docker_engine_ruby/resources/swarm.rb +28 -40
- data/lib/docker_engine_ruby/resources/system.rb +8 -49
- data/lib/docker_engine_ruby/resources/tasks.rb +12 -32
- data/lib/docker_engine_ruby/resources/volumes.rb +8 -22
- data/lib/docker_engine_ruby/version.rb +1 -1
- data/lib/docker_engine_ruby.rb +16 -5
- data/rbi/docker_engine_ruby/models/config.rbi +9 -7
- data/rbi/docker_engine_ruby/models/config_create_params.rbi +2 -34
- data/rbi/docker_engine_ruby/models/config_list_params.rbi +1 -22
- data/rbi/docker_engine_ruby/models/config_list_response.rbi +3 -1
- data/rbi/docker_engine_ruby/models/config_object.rbi +130 -0
- data/rbi/docker_engine_ruby/models/config_spec.rbi +127 -0
- data/rbi/docker_engine_ruby/models/config_update_params.rbi +1 -8
- data/rbi/docker_engine_ruby/models/connect_request.rbi +7 -12
- data/rbi/docker_engine_ruby/models/container.rbi +73 -194
- data/rbi/docker_engine_ruby/models/container_archive_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/container_attach_params.rbi +0 -28
- data/rbi/docker_engine_ruby/models/container_create_params.rbi +1 -3250
- data/rbi/docker_engine_ruby/models/container_delete_params.rbi +1 -12
- data/rbi/docker_engine_ruby/models/container_exec_params.rbi +0 -28
- data/rbi/docker_engine_ruby/models/container_inspect_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/container_kill_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/container_list_params.rbi +0 -50
- data/rbi/docker_engine_ruby/models/container_logs_params.rbi +0 -16
- data/rbi/docker_engine_ruby/models/container_prune_params.rbi +1 -26
- data/rbi/docker_engine_ruby/models/container_prune_response.rbi +1 -8
- data/rbi/docker_engine_ruby/models/container_rename_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/container_resize_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/container_restart_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/container_start_params.rbi +1 -10
- data/rbi/docker_engine_ruby/models/container_stats_params.rbi +1 -13
- data/rbi/docker_engine_ruby/models/container_stop_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/container_top_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/container_update_params.rbi +1 -170
- data/rbi/docker_engine_ruby/models/container_wait_params.rbi +1 -13
- data/rbi/docker_engine_ruby/models/create_request.rbi +7 -139
- data/rbi/docker_engine_ruby/models/exec_inspect_response.rbi +0 -2
- data/rbi/docker_engine_ruby/models/exec_resize_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/exec_start_params.rbi +0 -6
- data/rbi/docker_engine_ruby/models/filesystem_change.rbi +10 -13
- data/rbi/docker_engine_ruby/models/image.rbi +48 -106
- data/rbi/docker_engine_ruby/models/image_build_params.rbi +0 -127
- data/rbi/docker_engine_ruby/models/image_build_prune_params.rbi +0 -38
- data/rbi/docker_engine_ruby/models/image_build_prune_response.rbi +1 -6
- data/rbi/docker_engine_ruby/models/image_commit_params.rbi +0 -14
- data/rbi/docker_engine_ruby/models/image_delete_params.rbi +0 -10
- data/rbi/docker_engine_ruby/models/image_get_all_params.rbi +1 -17
- data/rbi/docker_engine_ruby/models/image_get_params.rbi +1 -14
- data/rbi/docker_engine_ruby/models/image_history_params.rbi +1 -24
- data/rbi/docker_engine_ruby/models/image_inspect_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/image_list_params.rbi +0 -32
- data/rbi/docker_engine_ruby/models/image_list_response.rbi +3 -1
- data/rbi/docker_engine_ruby/models/image_load_params.rbi +1 -18
- data/rbi/docker_engine_ruby/models/image_prune_params.rbi +1 -26
- data/rbi/docker_engine_ruby/models/image_prune_response.rbi +1 -8
- data/rbi/docker_engine_ruby/models/image_pull_params.rbi +6 -79
- data/rbi/docker_engine_ruby/models/image_push_params.rbi +0 -22
- data/rbi/docker_engine_ruby/models/image_search_params.rbi +1 -20
- data/rbi/docker_engine_ruby/models/image_search_response.rbi +0 -10
- data/rbi/docker_engine_ruby/models/image_summary.rbi +1073 -0
- data/rbi/docker_engine_ruby/models/image_tag_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/info.rbi +33 -80
- data/rbi/docker_engine_ruby/models/inspect.rbi +6 -12
- data/rbi/docker_engine_ruby/models/network.rbi +7 -4
- data/rbi/docker_engine_ruby/models/network_create_params.rbi +0 -30
- data/rbi/docker_engine_ruby/models/network_create_response.rbi +37 -0
- data/rbi/docker_engine_ruby/models/network_inspect_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/network_inspect_response.rbi +345 -198
- data/rbi/docker_engine_ruby/models/network_list_params.rbi +1 -36
- data/rbi/docker_engine_ruby/models/network_list_response.rbi +3 -1
- data/rbi/docker_engine_ruby/models/network_prune_params.rbi +1 -26
- data/rbi/docker_engine_ruby/models/network_prune_response.rbi +1 -5
- data/rbi/docker_engine_ruby/models/network_summary.rbi +444 -0
- data/rbi/docker_engine_ruby/models/node.rbi +15 -21
- data/rbi/docker_engine_ruby/models/node_delete_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/node_list_params.rbi +1 -24
- data/rbi/docker_engine_ruby/models/node_spec.rbi +126 -0
- data/rbi/docker_engine_ruby/models/node_update_params.rbi +1 -8
- data/rbi/docker_engine_ruby/models/plugin.rbi +1 -11
- data/rbi/docker_engine_ruby/models/plugin_create_params.rbi +1 -9
- data/rbi/docker_engine_ruby/models/plugin_delete_params.rbi +1 -8
- data/rbi/docker_engine_ruby/models/plugin_disable_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/plugin_enable_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/plugin_list_params.rbi +1 -18
- data/rbi/docker_engine_ruby/models/plugin_privileges_params.rbi +1 -8
- data/rbi/docker_engine_ruby/models/plugin_pull_params.rbi +6 -21
- data/rbi/docker_engine_ruby/models/plugin_set_params.rbi +3 -6
- data/rbi/docker_engine_ruby/models/plugin_upgrade_params.rbi +3 -17
- data/rbi/docker_engine_ruby/models/secret.rbi +12 -12
- data/rbi/docker_engine_ruby/models/secret_create_params.rbi +2 -34
- data/rbi/docker_engine_ruby/models/secret_list_params.rbi +1 -22
- data/rbi/docker_engine_ruby/models/secret_spec.rbi +181 -0
- data/rbi/docker_engine_ruby/models/secret_update_params.rbi +1 -8
- data/rbi/docker_engine_ruby/models/service.rbi +24 -44
- data/rbi/docker_engine_ruby/models/service_create_params.rbi +1 -36
- data/rbi/docker_engine_ruby/models/service_create_response.rbi +50 -0
- data/rbi/docker_engine_ruby/models/service_inspect_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/service_list_params.rbi +1 -25
- data/rbi/docker_engine_ruby/models/service_logs_params.rbi +0 -16
- data/rbi/docker_engine_ruby/models/{spec.rbi → service_spec.rbi} +157 -186
- data/rbi/docker_engine_ruby/models/service_update_params.rbi +0 -50
- data/rbi/docker_engine_ruby/models/service_update_response.rbi +33 -0
- data/rbi/docker_engine_ruby/models/stats_response.rbi +213 -141
- data/rbi/docker_engine_ruby/models/summary.rbi +16 -53
- data/rbi/docker_engine_ruby/models/swarm.rbi +12 -12
- data/rbi/docker_engine_ruby/models/swarm_init_params.rbi +4 -54
- data/rbi/docker_engine_ruby/models/swarm_join_params.rbi +0 -36
- data/rbi/docker_engine_ruby/models/swarm_leave_params.rbi +1 -8
- data/rbi/docker_engine_ruby/models/swarm_spec.rbi +568 -0
- data/rbi/docker_engine_ruby/models/swarm_unlock_key_response.rbi +1 -5
- data/rbi/docker_engine_ruby/models/swarm_unlock_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/swarm_update_params.rbi +0 -10
- data/rbi/docker_engine_ruby/models/system_data_usage_params.rbi +79 -27
- data/rbi/docker_engine_ruby/models/system_events_params.rbi +1 -46
- data/rbi/docker_engine_ruby/models/task.rbi +16 -20
- data/rbi/docker_engine_ruby/models/task_list_params.rbi +1 -26
- data/rbi/docker_engine_ruby/models/task_logs_params.rbi +0 -16
- data/rbi/docker_engine_ruby/models/task_spec.rbi +3011 -0
- data/rbi/docker_engine_ruby/models/version.rbi +8 -22
- data/rbi/docker_engine_ruby/models/volume.rbi +25 -225
- data/rbi/docker_engine_ruby/models/volume_delete_params.rbi +1 -6
- data/rbi/docker_engine_ruby/models/volume_list_params.rbi +1 -24
- data/rbi/docker_engine_ruby/models/volume_prune_params.rbi +1 -22
- data/rbi/docker_engine_ruby/models/volume_prune_response.rbi +1 -8
- data/rbi/docker_engine_ruby/models/volume_update_params.rbi +7 -143
- data/rbi/docker_engine_ruby/models.rbi +23 -1
- data/rbi/docker_engine_ruby/resources/auth.rbi +1 -2
- data/rbi/docker_engine_ruby/resources/configs.rbi +11 -32
- data/rbi/docker_engine_ruby/resources/containers.rbi +36 -388
- data/rbi/docker_engine_ruby/resources/distribution.rbi +2 -6
- data/rbi/docker_engine_ruby/resources/exec.rbi +5 -24
- data/rbi/docker_engine_ruby/resources/images.rbi +73 -366
- data/rbi/docker_engine_ruby/resources/networks.rbi +9 -78
- data/rbi/docker_engine_ruby/resources/nodes.rbi +7 -31
- data/rbi/docker_engine_ruby/resources/plugins.rbi +22 -91
- data/rbi/docker_engine_ruby/resources/secrets.rbi +9 -30
- data/rbi/docker_engine_ruby/resources/services.rbi +14 -62
- data/rbi/docker_engine_ruby/resources/swarm.rbi +8 -61
- data/rbi/docker_engine_ruby/resources/system.rbi +11 -66
- data/rbi/docker_engine_ruby/resources/tasks.rbi +3 -34
- data/rbi/docker_engine_ruby/resources/volumes.rbi +7 -43
- data/sig/docker_engine_ruby/models/config.rbs +11 -9
- data/sig/docker_engine_ruby/models/config_create_params.rbs +3 -24
- data/sig/docker_engine_ruby/models/config_list_response.rbs +1 -1
- data/sig/docker_engine_ruby/models/config_object.rbs +64 -0
- data/sig/docker_engine_ruby/models/config_spec.rbs +59 -0
- data/sig/docker_engine_ruby/models/connect_request.rbs +12 -12
- data/sig/docker_engine_ruby/models/container.rbs +62 -62
- data/sig/docker_engine_ruby/models/container_create_params.rbs +1 -1321
- data/sig/docker_engine_ruby/models/container_update_params.rbs +0 -51
- data/sig/docker_engine_ruby/models/create_request.rbs +5 -5
- data/sig/docker_engine_ruby/models/filesystem_change.rbs +1 -1
- data/sig/docker_engine_ruby/models/image.rbs +51 -53
- data/sig/docker_engine_ruby/models/image_list_response.rbs +1 -1
- data/sig/docker_engine_ruby/models/image_pull_params.rbs +5 -7
- data/sig/docker_engine_ruby/models/image_summary.rbs +457 -0
- data/sig/docker_engine_ruby/models/info.rbs +61 -41
- data/sig/docker_engine_ruby/models/inspect.rbs +12 -8
- data/sig/docker_engine_ruby/models/network.rbs +5 -5
- data/sig/docker_engine_ruby/models/network_create_response.rbs +15 -0
- data/sig/docker_engine_ruby/models/network_inspect_response.rbs +179 -90
- data/sig/docker_engine_ruby/models/network_list_response.rbs +1 -1
- data/sig/docker_engine_ruby/models/network_summary.rbs +238 -0
- data/sig/docker_engine_ruby/models/node.rbs +23 -19
- data/sig/docker_engine_ruby/models/node_spec.rbs +70 -0
- data/sig/docker_engine_ruby/models/plugin_pull_params.rbs +5 -9
- data/sig/docker_engine_ruby/models/plugin_set_params.rbs +2 -4
- data/sig/docker_engine_ruby/models/plugin_upgrade_params.rbs +2 -6
- data/sig/docker_engine_ruby/models/secret.rbs +15 -15
- data/sig/docker_engine_ruby/models/secret_create_params.rbs +3 -24
- data/sig/docker_engine_ruby/models/secret_spec.rbs +82 -0
- data/sig/docker_engine_ruby/models/service.rbs +32 -30
- data/sig/docker_engine_ruby/models/service_create_params.rbs +1 -16
- data/sig/docker_engine_ruby/models/service_create_response.rbs +17 -0
- data/sig/docker_engine_ruby/models/service_spec.rbs +471 -0
- data/sig/docker_engine_ruby/models/service_update_params.rbs +0 -13
- data/sig/docker_engine_ruby/models/service_update_response.rbs +15 -0
- data/sig/docker_engine_ruby/models/stats_response.rbs +188 -74
- data/sig/docker_engine_ruby/models/summary.rbs +20 -16
- data/sig/docker_engine_ruby/models/swarm.rbs +15 -15
- data/sig/docker_engine_ruby/models/swarm_init_params.rbs +5 -5
- data/sig/docker_engine_ruby/models/swarm_spec.rbs +293 -0
- data/sig/docker_engine_ruby/models/system_data_usage_params.rbs +25 -10
- data/sig/docker_engine_ruby/models/task.rbs +20 -20
- data/sig/docker_engine_ruby/models/task_spec.rbs +1480 -0
- data/sig/docker_engine_ruby/models/version.rbs +13 -4
- data/sig/docker_engine_ruby/models/volume.rbs +27 -25
- data/sig/docker_engine_ruby/models/volume_update_params.rbs +5 -5
- data/sig/docker_engine_ruby/models.rbs +23 -1
- data/sig/docker_engine_ruby/resources/configs.rbs +3 -3
- data/sig/docker_engine_ruby/resources/containers.rbs +1 -2
- data/sig/docker_engine_ruby/resources/images.rbs +3 -3
- data/sig/docker_engine_ruby/resources/networks.rbs +2 -2
- data/sig/docker_engine_ruby/resources/nodes.rbs +1 -1
- data/sig/docker_engine_ruby/resources/plugins.rbs +3 -3
- data/sig/docker_engine_ruby/resources/secrets.rbs +2 -2
- data/sig/docker_engine_ruby/resources/services.rbs +4 -4
- data/sig/docker_engine_ruby/resources/swarm.rbs +2 -2
- data/sig/docker_engine_ruby/resources/system.rbs +1 -1
- metadata +37 -4
- data/sig/docker_engine_ruby/models/spec.rbs +0 -467
|
@@ -6,7 +6,7 @@ module DockerEngineRuby
|
|
|
6
6
|
# Create a container
|
|
7
7
|
sig do
|
|
8
8
|
params(
|
|
9
|
-
config: DockerEngineRuby::
|
|
9
|
+
config: DockerEngineRuby::Config::OrHash,
|
|
10
10
|
name: String,
|
|
11
11
|
platform: String,
|
|
12
12
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
@@ -15,31 +15,15 @@ module DockerEngineRuby
|
|
|
15
15
|
def create(
|
|
16
16
|
# Body param: Configuration for a container that is portable between hosts.
|
|
17
17
|
config:,
|
|
18
|
-
# Query param
|
|
19
|
-
# `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
|
|
18
|
+
# Query param
|
|
20
19
|
name: nil,
|
|
21
|
-
# Query param
|
|
22
|
-
#
|
|
23
|
-
# When specified, the daemon checks if the requested image is present in the local
|
|
24
|
-
# image cache with the given OS and Architecture, and otherwise returns a `404`
|
|
25
|
-
# status.
|
|
26
|
-
#
|
|
27
|
-
# If the option is not set, the host's native OS and Architecture are used to look
|
|
28
|
-
# up the image in the image cache. However, if no platform is passed and the given
|
|
29
|
-
# image does exist in the local image cache, but its OS or architecture does not
|
|
30
|
-
# match, the container is created with the available image, and a warning is added
|
|
31
|
-
# to the `Warnings` field in the response, for example;
|
|
32
|
-
#
|
|
33
|
-
# WARNING: The requested image's platform (linux/arm64/v8) does not
|
|
34
|
-
# match the detected host platform (linux/amd64) and no
|
|
35
|
-
# specific platform was requested
|
|
20
|
+
# Query param
|
|
36
21
|
platform: nil,
|
|
37
22
|
request_options: {}
|
|
38
23
|
)
|
|
39
24
|
end
|
|
40
25
|
|
|
41
|
-
#
|
|
42
|
-
# it.
|
|
26
|
+
# Update a container
|
|
43
27
|
sig do
|
|
44
28
|
params(
|
|
45
29
|
id: String,
|
|
@@ -91,15 +75,12 @@ module DockerEngineRuby
|
|
|
91
75
|
nano_cpus: Integer,
|
|
92
76
|
oom_kill_disable: T::Boolean,
|
|
93
77
|
pids_limit: T.nilable(Integer),
|
|
94
|
-
restart_policy:
|
|
95
|
-
DockerEngineRuby::ContainerUpdateParams::RestartPolicy::OrHash,
|
|
96
78
|
ulimits:
|
|
97
79
|
T::Array[DockerEngineRuby::ContainerUpdateParams::Ulimit::OrHash],
|
|
98
80
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
99
81
|
).returns(DockerEngineRuby::UpdateResponse)
|
|
100
82
|
end
|
|
101
83
|
def update(
|
|
102
|
-
# ID or name of the container
|
|
103
84
|
id,
|
|
104
85
|
# Limit read rate (bytes per second) from a device, in the form:
|
|
105
86
|
#
|
|
@@ -197,11 +178,6 @@ module DockerEngineRuby
|
|
|
197
178
|
# Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not
|
|
198
179
|
# change.
|
|
199
180
|
pids_limit: nil,
|
|
200
|
-
# The behavior to apply when the container exits. The default is not to restart.
|
|
201
|
-
#
|
|
202
|
-
# An ever increasing delay (double the previous delay, starting at 100ms) is added
|
|
203
|
-
# before each restart to prevent flooding the server.
|
|
204
|
-
restart_policy: nil,
|
|
205
181
|
# A list of resource limits to set in the container. For example:
|
|
206
182
|
#
|
|
207
183
|
# ```
|
|
@@ -212,12 +188,7 @@ module DockerEngineRuby
|
|
|
212
188
|
)
|
|
213
189
|
end
|
|
214
190
|
|
|
215
|
-
#
|
|
216
|
-
# [inspect endpoint](#operation/ContainerInspect).
|
|
217
|
-
#
|
|
218
|
-
# Note that it uses a different, smaller representation of a container than
|
|
219
|
-
# inspecting a single container. For example, the list of linked containers is not
|
|
220
|
-
# propagated .
|
|
191
|
+
# List containers
|
|
221
192
|
sig do
|
|
222
193
|
params(
|
|
223
194
|
all: T::Boolean,
|
|
@@ -228,34 +199,9 @@ module DockerEngineRuby
|
|
|
228
199
|
).returns(T::Array[DockerEngineRuby::Summary])
|
|
229
200
|
end
|
|
230
201
|
def list(
|
|
231
|
-
# Return all containers. By default, only running containers are shown.
|
|
232
202
|
all: nil,
|
|
233
|
-
# Filters to process on the container list, encoded as JSON (a
|
|
234
|
-
# `map[string][]string`). For example, `{"status": ["paused"]}` will only return
|
|
235
|
-
# paused containers.
|
|
236
|
-
#
|
|
237
|
-
# Available filters:
|
|
238
|
-
#
|
|
239
|
-
# - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
|
|
240
|
-
# - `before`=(`<container id>` or `<container name>`)
|
|
241
|
-
# - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
|
|
242
|
-
# - `exited=<int>` containers with exit code of `<int>`
|
|
243
|
-
# - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
|
|
244
|
-
# - `id=<ID>` a container's ID
|
|
245
|
-
# - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
|
|
246
|
-
# - `is-task=`(`true`|`false`)
|
|
247
|
-
# - `label=key` or `label="key=value"` of a container label
|
|
248
|
-
# - `name=<name>` a container's name
|
|
249
|
-
# - `network`=(`<network id>` or `<network name>`)
|
|
250
|
-
# - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
|
|
251
|
-
# - `since`=(`<container id>` or `<container name>`)
|
|
252
|
-
# - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
|
|
253
|
-
# - `volume`=(`<volume name>` or `<mount point destination>`)
|
|
254
203
|
filters: nil,
|
|
255
|
-
# Return this number of most recently created containers, including non-running
|
|
256
|
-
# ones.
|
|
257
204
|
limit: nil,
|
|
258
|
-
# Return the size of container as fields `SizeRw` and `SizeRootFs`.
|
|
259
205
|
size: nil,
|
|
260
206
|
request_options: {}
|
|
261
207
|
)
|
|
@@ -271,20 +217,10 @@ module DockerEngineRuby
|
|
|
271
217
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
272
218
|
).void
|
|
273
219
|
end
|
|
274
|
-
def delete(
|
|
275
|
-
# ID or name of the container
|
|
276
|
-
id,
|
|
277
|
-
# If the container is running, kill it before removing it.
|
|
278
|
-
force: nil,
|
|
279
|
-
# Remove the specified link associated with the container.
|
|
280
|
-
link: nil,
|
|
281
|
-
# Remove anonymous volumes associated with the container.
|
|
282
|
-
v: nil,
|
|
283
|
-
request_options: {}
|
|
284
|
-
)
|
|
220
|
+
def delete(id, force: nil, link: nil, v: nil, request_options: {})
|
|
285
221
|
end
|
|
286
222
|
|
|
287
|
-
# Get
|
|
223
|
+
# Get an archive of a filesystem resource in a container
|
|
288
224
|
sig do
|
|
289
225
|
params(
|
|
290
226
|
id: String,
|
|
@@ -292,110 +228,10 @@ module DockerEngineRuby
|
|
|
292
228
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
293
229
|
).void
|
|
294
230
|
end
|
|
295
|
-
def archive(
|
|
296
|
-
# ID or name of the container
|
|
297
|
-
id,
|
|
298
|
-
# Resource in the container’s filesystem to archive.
|
|
299
|
-
path:,
|
|
300
|
-
request_options: {}
|
|
301
|
-
)
|
|
231
|
+
def archive(id, path:, request_options: {})
|
|
302
232
|
end
|
|
303
233
|
|
|
304
|
-
# Attach to a container
|
|
305
|
-
# same container multiple times and you can reattach to containers that have been
|
|
306
|
-
# detached.
|
|
307
|
-
#
|
|
308
|
-
# Either the `stream` or `logs` parameter must be `true` for this endpoint to do
|
|
309
|
-
# anything.
|
|
310
|
-
#
|
|
311
|
-
# See the
|
|
312
|
-
# [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/)
|
|
313
|
-
# for more details.
|
|
314
|
-
#
|
|
315
|
-
# ### Hijacking
|
|
316
|
-
#
|
|
317
|
-
# This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and
|
|
318
|
-
# `stderr` on the same socket.
|
|
319
|
-
#
|
|
320
|
-
# This is the response from the daemon for an attach request:
|
|
321
|
-
#
|
|
322
|
-
# ```
|
|
323
|
-
# HTTP/1.1 200 OK
|
|
324
|
-
# Content-Type: application/vnd.docker.raw-stream
|
|
325
|
-
#
|
|
326
|
-
# [STREAM]
|
|
327
|
-
# ```
|
|
328
|
-
#
|
|
329
|
-
# After the headers and two new lines, the TCP connection can now be used for raw,
|
|
330
|
-
# bidirectional communication between the client and server.
|
|
331
|
-
#
|
|
332
|
-
# To hint potential proxies about connection hijacking, the Docker client can also
|
|
333
|
-
# optionally send connection upgrade headers.
|
|
334
|
-
#
|
|
335
|
-
# For example, the client sends this request to upgrade the connection:
|
|
336
|
-
#
|
|
337
|
-
# ```
|
|
338
|
-
# POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
|
|
339
|
-
# Upgrade: tcp
|
|
340
|
-
# Connection: Upgrade
|
|
341
|
-
# ```
|
|
342
|
-
#
|
|
343
|
-
# The Docker daemon will respond with a `101 UPGRADED` response, and will
|
|
344
|
-
# similarly follow with the raw stream:
|
|
345
|
-
#
|
|
346
|
-
# ```
|
|
347
|
-
# HTTP/1.1 101 UPGRADED
|
|
348
|
-
# Content-Type: application/vnd.docker.raw-stream
|
|
349
|
-
# Connection: Upgrade
|
|
350
|
-
# Upgrade: tcp
|
|
351
|
-
#
|
|
352
|
-
# [STREAM]
|
|
353
|
-
# ```
|
|
354
|
-
#
|
|
355
|
-
# ### Stream format
|
|
356
|
-
#
|
|
357
|
-
# When the TTY setting is disabled in
|
|
358
|
-
# [`POST /containers/create`](#operation/ContainerCreate), the HTTP Content-Type
|
|
359
|
-
# header is set to application/vnd.docker.multiplexed-stream and the stream over
|
|
360
|
-
# the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The
|
|
361
|
-
# stream consists of a series of frames, each containing a header and a payload.
|
|
362
|
-
#
|
|
363
|
-
# The header contains the information which the stream writes (`stdout` or
|
|
364
|
-
# `stderr`). It also contains the size of the associated frame encoded in the last
|
|
365
|
-
# four bytes (`uint32`).
|
|
366
|
-
#
|
|
367
|
-
# It is encoded on the first eight bytes like this:
|
|
368
|
-
#
|
|
369
|
-
# ```go
|
|
370
|
-
# header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
|
|
371
|
-
# ```
|
|
372
|
-
#
|
|
373
|
-
# `STREAM_TYPE` can be:
|
|
374
|
-
#
|
|
375
|
-
# - 0: `stdin` (is written on `stdout`)
|
|
376
|
-
# - 1: `stdout`
|
|
377
|
-
# - 2: `stderr`
|
|
378
|
-
#
|
|
379
|
-
# `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as
|
|
380
|
-
# big endian.
|
|
381
|
-
#
|
|
382
|
-
# Following the header is the payload, which is the specified number of bytes of
|
|
383
|
-
# `STREAM_TYPE`.
|
|
384
|
-
#
|
|
385
|
-
# The simplest way to implement this protocol is the following:
|
|
386
|
-
#
|
|
387
|
-
# 1. Read 8 bytes.
|
|
388
|
-
# 2. Choose `stdout` or `stderr` depending on the first byte.
|
|
389
|
-
# 3. Extract the frame size from the last four bytes.
|
|
390
|
-
# 4. Read the extracted size and output it on the correct output.
|
|
391
|
-
# 5. Goto 1.
|
|
392
|
-
#
|
|
393
|
-
# ### Stream format when using a TTY
|
|
394
|
-
#
|
|
395
|
-
# When the TTY setting is enabled in
|
|
396
|
-
# [`POST /containers/create`](#operation/ContainerCreate), the stream is not
|
|
397
|
-
# multiplexed. The data exchanged over the hijacked connection is simply the raw
|
|
398
|
-
# data from the process PTY and client's `stdin`.
|
|
234
|
+
# Attach to a container
|
|
399
235
|
sig do
|
|
400
236
|
params(
|
|
401
237
|
id: String,
|
|
@@ -409,52 +245,28 @@ module DockerEngineRuby
|
|
|
409
245
|
).void
|
|
410
246
|
end
|
|
411
247
|
def attach(
|
|
412
|
-
# ID or name of the container
|
|
413
248
|
id,
|
|
414
|
-
# Override the key sequence for detaching a container.Format is a single character
|
|
415
|
-
# `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`
|
|
416
|
-
# or `_`.
|
|
417
249
|
detach_keys: nil,
|
|
418
|
-
# Replay previous logs from the container.
|
|
419
|
-
#
|
|
420
|
-
# This is useful for attaching to a container that has started and you want to
|
|
421
|
-
# output everything since the container started.
|
|
422
|
-
#
|
|
423
|
-
# If `stream` is also enabled, once all the previous output has been returned, it
|
|
424
|
-
# will seamlessly transition into streaming current output.
|
|
425
250
|
logs: nil,
|
|
426
|
-
# Attach to `stderr`
|
|
427
251
|
stderr: nil,
|
|
428
|
-
# Attach to `stdin`
|
|
429
252
|
stdin: nil,
|
|
430
|
-
# Attach to `stdout`
|
|
431
253
|
stdout: nil,
|
|
432
|
-
# Stream attached streams from the time the request was made onwards.
|
|
433
254
|
stream: nil,
|
|
434
255
|
request_options: {}
|
|
435
256
|
)
|
|
436
257
|
end
|
|
437
258
|
|
|
438
|
-
#
|
|
439
|
-
# modified. The `Kind` of modification can be one of:
|
|
440
|
-
#
|
|
441
|
-
# - `0`: Modified ("C")
|
|
442
|
-
# - `1`: Added ("A")
|
|
443
|
-
# - `2`: Deleted ("D")
|
|
259
|
+
# Get changes on a container’s filesystem
|
|
444
260
|
sig do
|
|
445
261
|
params(
|
|
446
262
|
id: String,
|
|
447
263
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
448
264
|
).returns(T::Array[DockerEngineRuby::FilesystemChange])
|
|
449
265
|
end
|
|
450
|
-
def changes(
|
|
451
|
-
# ID or name of the container
|
|
452
|
-
id,
|
|
453
|
-
request_options: {}
|
|
454
|
-
)
|
|
266
|
+
def changes(id, request_options: {})
|
|
455
267
|
end
|
|
456
268
|
|
|
457
|
-
#
|
|
269
|
+
# Create an exec instance
|
|
458
270
|
sig do
|
|
459
271
|
params(
|
|
460
272
|
id: String,
|
|
@@ -473,52 +285,33 @@ module DockerEngineRuby
|
|
|
473
285
|
).returns(DockerEngineRuby::Models::ContainerExecResponse)
|
|
474
286
|
end
|
|
475
287
|
def exec_(
|
|
476
|
-
# ID or name of container
|
|
477
288
|
id,
|
|
478
|
-
# Attach to `stderr` of the exec command.
|
|
479
289
|
attach_stderr: nil,
|
|
480
|
-
# Attach to `stdin` of the exec command.
|
|
481
290
|
attach_stdin: nil,
|
|
482
|
-
# Attach to `stdout` of the exec command.
|
|
483
291
|
attach_stdout: nil,
|
|
484
|
-
# Command to run, as a string or array of strings.
|
|
485
292
|
cmd: nil,
|
|
486
|
-
# Initial console size, as an `[height, width]` array.
|
|
487
293
|
console_size: nil,
|
|
488
|
-
# Override the key sequence for detaching a container. Format is a single
|
|
489
|
-
# character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`,
|
|
490
|
-
# `[`, `,` or `_`.
|
|
491
294
|
detach_keys: nil,
|
|
492
|
-
# A list of environment variables in the form `["VAR=value", ...]`.
|
|
493
295
|
env: nil,
|
|
494
|
-
# Runs the exec process with extended privileges.
|
|
495
296
|
privileged: nil,
|
|
496
|
-
# Allocate a pseudo-TTY.
|
|
497
297
|
tty: nil,
|
|
498
|
-
# The user, and optionally, group to run the exec process inside the container.
|
|
499
|
-
# Format is one of: `user`, `user:group`, `uid`, or `uid:gid`.
|
|
500
298
|
user: nil,
|
|
501
|
-
# The working directory for the exec process inside the container.
|
|
502
299
|
working_dir: nil,
|
|
503
300
|
request_options: {}
|
|
504
301
|
)
|
|
505
302
|
end
|
|
506
303
|
|
|
507
|
-
# Export
|
|
304
|
+
# Export a container
|
|
508
305
|
sig do
|
|
509
306
|
params(
|
|
510
307
|
id: String,
|
|
511
308
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
512
309
|
).void
|
|
513
310
|
end
|
|
514
|
-
def export(
|
|
515
|
-
# ID or name of the container
|
|
516
|
-
id,
|
|
517
|
-
request_options: {}
|
|
518
|
-
)
|
|
311
|
+
def export(id, request_options: {})
|
|
519
312
|
end
|
|
520
313
|
|
|
521
|
-
#
|
|
314
|
+
# Inspect a container
|
|
522
315
|
sig do
|
|
523
316
|
params(
|
|
524
317
|
id: String,
|
|
@@ -526,16 +319,10 @@ module DockerEngineRuby
|
|
|
526
319
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
527
320
|
).returns(DockerEngineRuby::Container)
|
|
528
321
|
end
|
|
529
|
-
def inspect_(
|
|
530
|
-
# ID or name of the container
|
|
531
|
-
id,
|
|
532
|
-
# Return the size of container as fields `SizeRw` and `SizeRootFs`
|
|
533
|
-
size: nil,
|
|
534
|
-
request_options: {}
|
|
535
|
-
)
|
|
322
|
+
def inspect_(id, size: nil, request_options: {})
|
|
536
323
|
end
|
|
537
324
|
|
|
538
|
-
#
|
|
325
|
+
# Kill a container
|
|
539
326
|
sig do
|
|
540
327
|
params(
|
|
541
328
|
id: String,
|
|
@@ -543,19 +330,10 @@ module DockerEngineRuby
|
|
|
543
330
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
544
331
|
).void
|
|
545
332
|
end
|
|
546
|
-
def kill(
|
|
547
|
-
# ID or name of the container
|
|
548
|
-
id,
|
|
549
|
-
# Signal to send to the container as an integer or string (e.g. `SIGINT`).
|
|
550
|
-
signal: nil,
|
|
551
|
-
request_options: {}
|
|
552
|
-
)
|
|
333
|
+
def kill(id, signal: nil, request_options: {})
|
|
553
334
|
end
|
|
554
335
|
|
|
555
|
-
# Get
|
|
556
|
-
#
|
|
557
|
-
# Note: This endpoint works only for containers with the `json-file` or `journald`
|
|
558
|
-
# logging driver.
|
|
336
|
+
# Get container logs
|
|
559
337
|
sig do
|
|
560
338
|
params(
|
|
561
339
|
id: String,
|
|
@@ -570,44 +348,26 @@ module DockerEngineRuby
|
|
|
570
348
|
).returns(StringIO)
|
|
571
349
|
end
|
|
572
350
|
def logs(
|
|
573
|
-
# ID or name of the container
|
|
574
351
|
id,
|
|
575
|
-
# Keep connection after returning logs.
|
|
576
352
|
follow: nil,
|
|
577
|
-
# Only return logs since this time, as a UNIX timestamp
|
|
578
353
|
since: nil,
|
|
579
|
-
# Return logs from `stderr`
|
|
580
354
|
stderr: nil,
|
|
581
|
-
# Return logs from `stdout`
|
|
582
355
|
stdout: nil,
|
|
583
|
-
# Only return this number of log lines from the end of the logs. Specify as an
|
|
584
|
-
# integer or `all` to output all log lines.
|
|
585
356
|
tail: nil,
|
|
586
|
-
# Add timestamps to every log line
|
|
587
357
|
timestamps: nil,
|
|
588
|
-
# Only return logs before this time, as a UNIX timestamp
|
|
589
358
|
until_: nil,
|
|
590
359
|
request_options: {}
|
|
591
360
|
)
|
|
592
361
|
end
|
|
593
362
|
|
|
594
|
-
#
|
|
595
|
-
#
|
|
596
|
-
# Traditionally, when suspending a process the `SIGSTOP` signal is used, which is
|
|
597
|
-
# observable by the process being suspended. With the freezer cgroup the process
|
|
598
|
-
# is unaware, and unable to capture, that it is being suspended, and subsequently
|
|
599
|
-
# resumed.
|
|
363
|
+
# Pause a container
|
|
600
364
|
sig do
|
|
601
365
|
params(
|
|
602
366
|
id: String,
|
|
603
367
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
604
368
|
).void
|
|
605
369
|
end
|
|
606
|
-
def pause(
|
|
607
|
-
# ID or name of the container
|
|
608
|
-
id,
|
|
609
|
-
request_options: {}
|
|
610
|
-
)
|
|
370
|
+
def pause(id, request_options: {})
|
|
611
371
|
end
|
|
612
372
|
|
|
613
373
|
# Delete stopped containers
|
|
@@ -617,21 +377,7 @@ module DockerEngineRuby
|
|
|
617
377
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
618
378
|
).returns(DockerEngineRuby::Models::ContainerPruneResponse)
|
|
619
379
|
end
|
|
620
|
-
def prune(
|
|
621
|
-
# Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
|
|
622
|
-
#
|
|
623
|
-
# Available filters:
|
|
624
|
-
#
|
|
625
|
-
# - `until=<timestamp>` Prune containers created before this timestamp. The
|
|
626
|
-
# `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go
|
|
627
|
-
# duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon
|
|
628
|
-
# machine’s time.
|
|
629
|
-
# - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or
|
|
630
|
-
# `label!=<key>=<value>`) Prune containers with (or without, in case
|
|
631
|
-
# `label!=...` is used) the specified labels.
|
|
632
|
-
filters: nil,
|
|
633
|
-
request_options: {}
|
|
634
|
-
)
|
|
380
|
+
def prune(filters: nil, request_options: {})
|
|
635
381
|
end
|
|
636
382
|
|
|
637
383
|
# Rename a container
|
|
@@ -642,16 +388,10 @@ module DockerEngineRuby
|
|
|
642
388
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
643
389
|
).void
|
|
644
390
|
end
|
|
645
|
-
def rename(
|
|
646
|
-
# ID or name of the container
|
|
647
|
-
id,
|
|
648
|
-
# New name for the container
|
|
649
|
-
name:,
|
|
650
|
-
request_options: {}
|
|
651
|
-
)
|
|
391
|
+
def rename(id, name:, request_options: {})
|
|
652
392
|
end
|
|
653
393
|
|
|
654
|
-
# Resize
|
|
394
|
+
# Resize a container TTY
|
|
655
395
|
sig do
|
|
656
396
|
params(
|
|
657
397
|
id: String,
|
|
@@ -660,15 +400,7 @@ module DockerEngineRuby
|
|
|
660
400
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
661
401
|
).void
|
|
662
402
|
end
|
|
663
|
-
def resize(
|
|
664
|
-
# ID or name of the container
|
|
665
|
-
id,
|
|
666
|
-
# Height of the TTY session in characters
|
|
667
|
-
h:,
|
|
668
|
-
# Width of the TTY session in characters
|
|
669
|
-
w:,
|
|
670
|
-
request_options: {}
|
|
671
|
-
)
|
|
403
|
+
def resize(id, h:, w:, request_options: {})
|
|
672
404
|
end
|
|
673
405
|
|
|
674
406
|
# Restart a container
|
|
@@ -680,15 +412,7 @@ module DockerEngineRuby
|
|
|
680
412
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
681
413
|
).void
|
|
682
414
|
end
|
|
683
|
-
def restart(
|
|
684
|
-
# ID or name of the container
|
|
685
|
-
id,
|
|
686
|
-
# Signal to send to the container as an integer or string (e.g. `SIGINT`).
|
|
687
|
-
signal: nil,
|
|
688
|
-
# Number of seconds to wait before killing the container
|
|
689
|
-
t: nil,
|
|
690
|
-
request_options: {}
|
|
691
|
-
)
|
|
415
|
+
def restart(id, signal: nil, t: nil, request_options: {})
|
|
692
416
|
end
|
|
693
417
|
|
|
694
418
|
# Start a container
|
|
@@ -699,49 +423,10 @@ module DockerEngineRuby
|
|
|
699
423
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
700
424
|
).void
|
|
701
425
|
end
|
|
702
|
-
def start(
|
|
703
|
-
# ID or name of the container
|
|
704
|
-
id,
|
|
705
|
-
# Override the key sequence for detaching a container. Format is a single
|
|
706
|
-
# character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`,
|
|
707
|
-
# `[`, `,` or `_`.
|
|
708
|
-
detach_keys: nil,
|
|
709
|
-
request_options: {}
|
|
710
|
-
)
|
|
426
|
+
def start(id, detach_keys: nil, request_options: {})
|
|
711
427
|
end
|
|
712
428
|
|
|
713
|
-
#
|
|
714
|
-
#
|
|
715
|
-
# The `precpu_stats` is the CPU statistic of the _previous_ read, and is used to
|
|
716
|
-
# calculate the CPU usage percentage. It is not an exact copy of the `cpu_stats`
|
|
717
|
-
# field.
|
|
718
|
-
#
|
|
719
|
-
# If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is nil then for
|
|
720
|
-
# compatibility with older daemons the length of the corresponding
|
|
721
|
-
# `cpu_usage.percpu_usage` array should be used.
|
|
722
|
-
#
|
|
723
|
-
# On a cgroup v2 host, the following fields are not set
|
|
724
|
-
#
|
|
725
|
-
# - `blkio_stats`: all fields other than `io_service_bytes_recursive`
|
|
726
|
-
# - `cpu_stats`: `cpu_usage.percpu_usage`
|
|
727
|
-
# - `memory_stats`: `max_usage` and `failcnt` Also, `memory_stats.stats` fields
|
|
728
|
-
# are incompatible with cgroup v1.
|
|
729
|
-
#
|
|
730
|
-
# To calculate the values shown by the `stats` command of the docker cli tool the
|
|
731
|
-
# following formulas can be used:
|
|
732
|
-
#
|
|
733
|
-
# - used_memory = `memory_stats.usage - memory_stats.stats.cache` (cgroups v1)
|
|
734
|
-
# - used_memory = `memory_stats.usage - memory_stats.stats.inactive_file` (cgroups
|
|
735
|
-
# v2)
|
|
736
|
-
# - available_memory = `memory_stats.limit`
|
|
737
|
-
# - Memory usage % = `(used_memory / available_memory) * 100.0`
|
|
738
|
-
# - cpu_delta =
|
|
739
|
-
# `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
|
|
740
|
-
# - system_cpu_delta =
|
|
741
|
-
# `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
|
|
742
|
-
# - number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or
|
|
743
|
-
# `cpu_stats.online_cpus`
|
|
744
|
-
# - CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
|
|
429
|
+
# Get container stats based on resource usage
|
|
745
430
|
sig do
|
|
746
431
|
params(
|
|
747
432
|
id: String,
|
|
@@ -750,17 +435,7 @@ module DockerEngineRuby
|
|
|
750
435
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
751
436
|
).returns(DockerEngineRuby::StatsResponse)
|
|
752
437
|
end
|
|
753
|
-
def stats(
|
|
754
|
-
# ID or name of the container
|
|
755
|
-
id,
|
|
756
|
-
# Only get a single stat instead of waiting for 2 cycles. Must be used with
|
|
757
|
-
# `stream=false`.
|
|
758
|
-
one_shot: nil,
|
|
759
|
-
# Stream the output. If false, the stats will be output once and then it will
|
|
760
|
-
# disconnect.
|
|
761
|
-
stream: nil,
|
|
762
|
-
request_options: {}
|
|
763
|
-
)
|
|
438
|
+
def stats(id, one_shot: nil, stream: nil, request_options: {})
|
|
764
439
|
end
|
|
765
440
|
|
|
766
441
|
# Stop a container
|
|
@@ -772,19 +447,10 @@ module DockerEngineRuby
|
|
|
772
447
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
773
448
|
).void
|
|
774
449
|
end
|
|
775
|
-
def stop(
|
|
776
|
-
# ID or name of the container
|
|
777
|
-
id,
|
|
778
|
-
# Signal to send to the container as an integer or string (e.g. `SIGINT`).
|
|
779
|
-
signal: nil,
|
|
780
|
-
# Number of seconds to wait before killing the container
|
|
781
|
-
t: nil,
|
|
782
|
-
request_options: {}
|
|
783
|
-
)
|
|
450
|
+
def stop(id, signal: nil, t: nil, request_options: {})
|
|
784
451
|
end
|
|
785
452
|
|
|
786
|
-
#
|
|
787
|
-
# supported on Windows.
|
|
453
|
+
# List processes running inside a container
|
|
788
454
|
sig do
|
|
789
455
|
params(
|
|
790
456
|
id: String,
|
|
@@ -792,30 +458,20 @@ module DockerEngineRuby
|
|
|
792
458
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
793
459
|
).returns(DockerEngineRuby::TopResponse)
|
|
794
460
|
end
|
|
795
|
-
def top(
|
|
796
|
-
# ID or name of the container
|
|
797
|
-
id,
|
|
798
|
-
# The arguments to pass to `ps`. For example, `aux`
|
|
799
|
-
ps_args: nil,
|
|
800
|
-
request_options: {}
|
|
801
|
-
)
|
|
461
|
+
def top(id, ps_args: nil, request_options: {})
|
|
802
462
|
end
|
|
803
463
|
|
|
804
|
-
#
|
|
464
|
+
# Unpause a container
|
|
805
465
|
sig do
|
|
806
466
|
params(
|
|
807
467
|
id: String,
|
|
808
468
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
809
469
|
).void
|
|
810
470
|
end
|
|
811
|
-
def unpause(
|
|
812
|
-
# ID or name of the container
|
|
813
|
-
id,
|
|
814
|
-
request_options: {}
|
|
815
|
-
)
|
|
471
|
+
def unpause(id, request_options: {})
|
|
816
472
|
end
|
|
817
473
|
|
|
818
|
-
#
|
|
474
|
+
# Wait for a container
|
|
819
475
|
sig do
|
|
820
476
|
params(
|
|
821
477
|
id: String,
|
|
@@ -823,15 +479,7 @@ module DockerEngineRuby
|
|
|
823
479
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
824
480
|
).returns(DockerEngineRuby::WaitResponse)
|
|
825
481
|
end
|
|
826
|
-
def wait(
|
|
827
|
-
# ID or name of the container
|
|
828
|
-
id,
|
|
829
|
-
# Wait until a container state reaches the given condition.
|
|
830
|
-
#
|
|
831
|
-
# Defaults to `not-running` if omitted or empty.
|
|
832
|
-
condition: nil,
|
|
833
|
-
request_options: {}
|
|
834
|
-
)
|
|
482
|
+
def wait(id, condition: nil, request_options: {})
|
|
835
483
|
end
|
|
836
484
|
|
|
837
485
|
# @api private
|
|
@@ -3,18 +3,14 @@
|
|
|
3
3
|
module DockerEngineRuby
|
|
4
4
|
module Resources
|
|
5
5
|
class Distribution
|
|
6
|
-
#
|
|
6
|
+
# Get image information from the registry
|
|
7
7
|
sig do
|
|
8
8
|
params(
|
|
9
9
|
name: String,
|
|
10
10
|
request_options: DockerEngineRuby::RequestOptions::OrHash
|
|
11
11
|
).returns(DockerEngineRuby::Inspect)
|
|
12
12
|
end
|
|
13
|
-
def inspect_(
|
|
14
|
-
# Image name or id
|
|
15
|
-
name,
|
|
16
|
-
request_options: {}
|
|
17
|
-
)
|
|
13
|
+
def inspect_(name, request_options: {})
|
|
18
14
|
end
|
|
19
15
|
|
|
20
16
|
# @api private
|