Method: Inspec::Resources::Docker#object
- Defined in:
- lib/inspec/resources/docker.rb
#object(id) ⇒ Object
returns information about docker objects
170 171 172 173 174 175 176 177 |
# File 'lib/inspec/resources/docker.rb', line 170 def object(id) return @inspect if defined?(@inspect) data = JSON.parse(inspec.command("docker inspect #{id}").stdout) data = data[0] if data.is_a?(Array) @inspect = Hashie::Mash.new(data) rescue JSON::ParserError => _e Hashie::Mash.new({}) end |