Files
computer-playbook/cli/mirror/model.py
T
kevinveenbirkenbach 221c1c67aa feat(cli): add flexible docker image mirror resolver and sync system
Introduce a modular mirror subsystem with:
- canonical ImageRef model
- shared discovery & normalization logic for Docker Hub images
- pluggable registry providers (GHCR, Gitea-ready)
- inventory resolver for mirrored image paths
- skopeo-based mirror sync implementation

Design follows SRP/KISS principles and allows future registry backends.

https://chatgpt.com/share/6971e6cf-be18-800f-9419-589fd3e22c3d
2026-01-22 09:58:48 +01:00

14 lines
396 B
Python

from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class ImageRef:
role: str # e.g. svc-db-postgres
service: str # e.g. postgres
name: str # canonical image name, e.g. postgis/postgis or postgres
version: str # e.g. 17-3.5
source: (
str # docker hub source ref, e.g. postgis/postgis:17-3.5 or library/postgres:16
)