class Docker::API::System
This class represents the Docker
API system related endpoints. @see docs.docker.com/engine/api/v1.40/#tag/System
Public Instance Methods
Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.
Docker
API: POST /auth @see docs.docker.com/engine/api/v1.40/#operation/SystemAuth
@param body [Hash]: Request body to be sent as json.
# File lib/docker/api/system.rb, line 13 def auth body = {} @connection.request(method: :post, path: "/auth", headers: { "Content-Type" => "application/json" }, body: body.to_json) end
Get data usage information.
Docker
API: GET /system/df @see docs.docker.com/engine/api/v1.40/#operation/SystemDataUsage
# File lib/docker/api/system.rb, line 61 def df @connection.get("/system/df") end
Stream real-time events from the server.
Docker
API: GET /events @see docs.docker.com/engine/api/v1.40/#operation/SystemEvents
@param params [Hash]: Parameters that are appended to the URL. @param &block: Replace the default output to stdout behavior.
# File lib/docker/api/system.rb, line 25 def events params = {}, &block @connection.request(method: :get, path: build_path("/events", params), response_block: block_given? ? block : default_streamer ) end
Get system information.
Docker
API: GET /info @see docs.docker.com/engine/api/v1.40/#operation/SystemInfo
# File lib/docker/api/system.rb, line 43 def info @connection.get("/info") end
This is a dummy endpoint you can use to test if the server is accessible.
Docker
API: GET /_ping @see docs.docker.com/engine/api/v1.40/#operation/SystemPing
# File lib/docker/api/system.rb, line 34 def ping @connection.get("/_ping") end
Return the version of Docker
that is running and various information about the system that Docker
is running on.
Docker
API: GET /version @see docs.docker.com/engine/api/v1.40/#operation/SystemVersion
# File lib/docker/api/system.rb, line 52 def version @connection.get("/version") end