mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 19:32:17 +00:00
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
14 lines
396 B
Python
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
|
|
)
|