Sha256: 2daed5df33da1c9531e7d04c55c00201113e23f3e6d1dbecb3149d73e7f52682
Contents?: true
Size: 549 Bytes
Versions: 12
Compression:
Stored size: 549 Bytes
Contents
module Kontena::Cli::Containers class InspectCommand < Clamp::Command include Kontena::Cli::Common parameter "CONTAINER_ID", "Container id" def execute require_api_url token = require_token match = container_id.match(/(.+)-(\d+)/) if match service_name = match[1] result = client(token).get("containers/#{current_grid}/#{service_name}/#{container_id}/inspect") puts JSON.pretty_generate(result) else abort("Cannot resolve container service") end end end end
Version data entries
12 entries across 12 versions & 1 rubygems