This commit adds support for Docker Hub (registry-1.docker.io) as a container registry platform with special authentication handling for official images.
Changes:
- Add 'cr-docker' platform pointing to https://registry-1.docker.io in platforms.js
- Implement special authentication scope handling for Docker Hub official images
- Docker Hub stores official images (nginx, redis, etc.) as library/nginx, library/redis
- Single-component image names are automatically prefixed with 'library/' for authentication
- Multi-component names (user/image) are passed through unchanged
- Add comprehensive tests for Docker Hub support
This resolves the issue where pulling public images from Docker Hub would prompt for authentication incorrectly. The library prefix is now automatically added to the authentication scope for single-name images, allowing proper anonymous access to public official images.
Test coverage:
- Official images (single-name): /cr/docker/v2/nginx/manifests/latest
- User images (namespaced): /cr/docker/v2/nginxinc/nginx-unprivileged/manifests/latest
- GET and HEAD request methods verified
All Docker Hub specific tests pass.