class Rummager::ContainerTaskBase
Abstract base class for Container tasks
Attributes
container_name[RW]
Public Instance Methods
docker_obj()
click to toggle source
# File lib/rummager/containers.rb, line 48 def docker_obj begin @container_obj ||= Docker::Container.get(@container_name.to_s) rescue end end
exit_code()
click to toggle source
# File lib/rummager/containers.rb, line 75 def exit_code container_obj.json['State']['ExitCode'] end
has_container?()
click to toggle source
# File lib/rummager/containers.rb, line 55 def has_container? ! docker_obj.nil? end
is_running?()
click to toggle source
# File lib/rummager/containers.rb, line 59 def is_running? container_obj.json['State']['Running'] == false end
never_ran?()
click to toggle source
# File lib/rummager/containers.rb, line 63 def never_ran? if has_container? if docker_obj.json['State']['Running'] == true puts "#{@container_name} is running!" if Rake.verbose == true false else end else true end end