mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-02-14 23:19:37 +00:00
The manifest fetcher was using docker.io as the registry API endpoint, but Docker Hub's actual registry API is at registry-1.docker.io. When trying to access https://docker.io/v2/..., requests were being redirected to https://www.docker.com/ (the marketing site), which returned HTML instead of JSON, causing manifest fetching to fail. This matches exactly what Docker itself does internally - see daemon/pkg/registry/config.go:49 where Docker hardcodes DefaultRegistryHost = "registry-1.docker.io" for registry operations. Changes: - Add DOCKER_HUB_API constant for the actual API endpoint - Add _get_api_endpoint() helper to translate docker.io to registry-1.docker.io for HTTP API calls - Update _get_auth_token() and _fetch_manifest() to use the API endpoint - Keep docker.io as the registry identifier for naming and credentials - Add tests to verify the API endpoint translation Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>