Closed nandeshguru closed 7 years ago
@coolguru Thank you for your PR. i think it should be like if !container_info...
because i test there if the object empty. May be i am wrong?
@coolguru Sorry, to early for me today. you are right.
inspec> docker.object('40c6ad921df7428069626637cc2d43b8d2d9404aa440e00fd0eb37d11406e14c')['NetworkSettings']['Ports']
=> {}
inspec> docker.object('40c6ad921df7428069626637cc2d43b8d2d9404aa440e00fd0eb37d11406e14c')['NetworkSettings']['Ports'].nil?
=> false
PR for issue #37
load_with_context': undefined method `each' for nil:NilClass (NoMethodError) exception in cis-docker-benchmark-master/controls/container_runtime.rb:194