code: def _get_config():
      '''
      Get user docker configuration
  
      Return: dict
      '''
      cfg = os.path.expanduser('~/.dockercfg')
      try:
          fic = open(cfg)
          try:
              config = json.loads(fic.read())
          finally:
              fic.close()
      except Exception:
          config = {'rootPath': '/dev/null'}
      if not 'Configs' in config:
          config['Configs'] = {}
      return confif _get_config():
      '''
      Get user docker configuration
  
      Return: dict
      '''
      cfg = os.path.expanduser('~/.dockercfg')
      try:
          fic = open(cfg)
          try:
              config = json.loads(fic.read())
          finally:
              fic.close()
      except Exception:
          config = {'rootPath': '/dev/null'}
      if not 'Configs' in config:
          config['Configs'] = {}
      return config
docs: Get user docker configuration
  
      Return: dict