@memoized<EOL>def get_authed_registries():
result = set()<EOL>if not os.path.exists(constants.DOCKER_CONFIG_PATH):<EOL><INDENT>return result<EOL><DEDENT>config = json.load(open(constants.DOCKER_CONFIG_PATH, '<STR_LIT:r>'))<EOL>for registry in config.get('<STR_LIT>', {}).iterkeys():<EOL><INDENT>try:<EOL><INDENT>parsed = urlparse(registry)<EOL><DEDENT>except Exception:<EOL><INDENT>log_to_client('<STR_LIT>').format(registry)<EOL><DEDENT>result.add(parsed.netloc) if parsed.netloc else result.add(parsed.path)<EOL><DEDENT>return result<EOL>
Reads the local Docker client config for the current user
    and returns all registries to which the user may be logged in.
    This is intended to be run client-side, not by the daemon.