lib/brick/models/service.rb
#Check if the container is running
Check if the container is running
Check if the container is running
def running?
        is_running = false
        if container.nil?
          begin
            self.container = ::Docker::Container.get(name)
          rescue 
            self.container = nil
          end
        end
        unless container.nil?
          is_running = container.is_running?
        end
        is_running
      end
def running? is_running = false if container . nil? begin self . container = :: Docker :: Container . get ( name ) rescue self . container = nil end end unless container . nil? is_running = container . is_running? end is_running end
Check if the container is running
Check if the container is running