code: def get_containers(config,
                     all=True,
                     trunc=False,
                     since=None,
                     before=None,
                     limit=-1,
                     *args,
                     **kwargs):
      '''
      Get a list of mappings representing all containers
  
      all
          Return all containers
  
      trunc
          Set it to True to have the short ID
  
      Returns a mapping of containers
      '''
      err = "Unknown"
      client = _get_client(config)
      try:
          ret = client.containers(all=all,
                                  trunc=trunc,
                                  since=since,
                                  before=before,
                                  limit=limit)
          return ret
      except Exception as e:
          err = e
      utils.error("Unable to list Docker containers: %s"%err)
      return Nonf get_containers(config,
                     all=True,
                     trunc=False,
                     since=None,
                     before=None,
                     limit=-1,
                     *args,
                     **kwargs):
      '''
      Get a list of mappings representing all containers
  
      all
          Return all containers
  
      trunc
          Set it to True to have the short ID
  
      Returns a mapping of containers
      '''
      err = "Unknown"
      client = _get_client(config)
      try:
          ret = client.containers(all=all,
                                  trunc=trunc,
                                  since=since,
                                  before=before,
                                  limit=limit)
          return ret
      except Exception as e:
          err = e
      utils.error("Unable to list Docker containers: %s"%err)
      return None
docs: Get a list of mappings representing all containers
  
      all
          Return all containers
  
      trunc
          Set it to True to have the short ID
  
      Returns a mapping of containers