# daocloud/public-image-mirror architecture

> Architecture diagram of the GitHub repository daocloud/public-image-mirror, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/daocloud/public-image-mirror
- Repository: https://github.com/daocloud/public-image-mirror

## Overview

This repository is a public container-image mirror project, but its checked-in contents are primarily configuration and contribution guidance; the README identifies the actual mirror backend as the separate ocimirror project. The documented user workflow is to rewrite an upstream image reference with a mirror prefix, then pull through the mirror. The tree also includes allowlist and image-change contribution guidance, automation configuration, and local-cache deployment documentation. No source excerpts were provided, so internal request handling and storage stages cannot be mapped reliably.

Main entry points: [`.agents/skills/allower/SKILL.md`](https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/SKILL.md) (Image contribution guidance), [`docs/local-cache`](https://github.com/daocloud/public-image-mirror/tree/main/docs/local-cache) (Local cache deployment), [`.github/workflows/update-allows-list.yml`](https://github.com/daocloud/public-image-mirror/blob/main/.github/workflows/update-allows-list.yml) (Allowlist update workflow), [`.github/workflows`](https://github.com/daocloud/public-image-mirror/tree/main/.github/workflows) (Repository automation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_usage["Image mirror usage"]
  node_mirror_service["Mirror service"]
  node_upstream_registry["Upstream registry"]
  node_image_cache[("Image cache")]
  node_local_cache["Local cache deployment"]
  node_local_cache_docs["Local cache documentation<br/>[README.md]"]
end

subgraph group_governance["Allowlist governance"]
  node_allowlist["Allowlist<br/>[allows.txt]"]
  node_image_guidance["Image contribution guidance<br/>[SKILL.md]"]
  node_applicant_guidance["Applicant guidance<br/>[applicant.md]"]
  node_approver_guidance["Approver guidance<br/>[approver.md]"]
  node_pr_guidance["PR guidance<br/>[pr.md]"]
end

subgraph group_ops["Project operations"]
  node_image_issues["Image issue templates<br/>[allows-image.yml]"]
  node_gitee_image_issues["Gitee image issue template<br/>[allows-image.yml]"]
  node_sync_issue["Sync issue template<br/>[sync-image.yml]"]
  node_automation["Repository automation<br/>[workflows]"]
  node_image_list["Allowlist update workflow"]
end

node_image_user(("Image consumer"))
node_contributors(("Image contributors"))

node_image_user -->|"pulls through"| node_mirror_service
node_mirror_service -->|"mirrors images"| node_upstream_registry
node_mirror_service -->|"caches content"| node_image_cache
node_image_user -->|"deploys guidance"| node_local_cache
node_contributors -->|"follows"| node_image_guidance
node_image_guidance -->|"references"| node_applicant_guidance
node_image_guidance -->|"references"| node_approver_guidance
node_image_guidance -->|"references"| node_pr_guidance
node_contributors -->|"submits request"| node_image_issues
node_contributors -->|"submits request"| node_gitee_image_issues
node_contributors -->|"reports sync issue"| node_sync_issue
node_automation -.->|"includes workflow"| node_image_list
node_image_list -.->|"updates"| node_allowlist
node_local_cache -->|"documented by"| node_local_cache_docs

click node_local_cache "https://github.com/daocloud/public-image-mirror/tree/main/docs/local-cache"
click node_allowlist "https://github.com/daocloud/public-image-mirror/blob/main/allows.txt"
click node_image_guidance "https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/SKILL.md"
click node_applicant_guidance "https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/references/applicant.md"
click node_approver_guidance "https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/references/approver.md"
click node_pr_guidance "https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/references/pr.md"
click node_image_issues "https://github.com/daocloud/public-image-mirror/blob/main/.github/ISSUE_TEMPLATE/allows-image.yml"
click node_gitee_image_issues "https://github.com/daocloud/public-image-mirror/blob/main/.gitee/ISSUE_TEMPLATE/allows-image.yml"
click node_sync_issue "https://github.com/daocloud/public-image-mirror/blob/main/.github/ISSUE_TEMPLATE/sync-image.yml"
click node_automation "https://github.com/daocloud/public-image-mirror/tree/main/.github/workflows"
click node_image_list "https://github.com/daocloud/public-image-mirror/blob/main/.github/workflows/update-allows-list.yml"
click node_local_cache_docs "https://github.com/daocloud/public-image-mirror/blob/main/docs/local-cache/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mirror_service,node_upstream_registry,node_image_cache,node_local_cache,node_local_cache_docs toneBlue
class node_allowlist,node_image_guidance,node_applicant_guidance,node_approver_guidance,node_pr_guidance toneAmber
class node_image_issues,node_gitee_image_issues,node_sync_issue,node_automation,node_image_list toneMint
class node_image_user,node_contributors toneIndigo
```

## Components

### Image mirror usage

- **Mirror service**
- **Upstream registry**
- **Image cache**
- [Local cache deployment](https://github.com/daocloud/public-image-mirror/tree/main/docs/local-cache): `docs/local-cache`
- [Local cache documentation](https://github.com/daocloud/public-image-mirror/blob/main/docs/local-cache/README.md): `docs/local-cache/README.md`

### Allowlist governance

- [Allowlist](https://github.com/daocloud/public-image-mirror/blob/main/allows.txt): `allows.txt`
- [Image contribution guidance](https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/SKILL.md): `.agents/skills/allower/SKILL.md`
- [Applicant guidance](https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/references/applicant.md): `.agents/skills/allower/references/applicant.md`
- [Approver guidance](https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/references/approver.md): `.agents/skills/allower/references/approver.md`
- [PR guidance](https://github.com/daocloud/public-image-mirror/blob/main/.agents/skills/allower/references/pr.md): `.agents/skills/allower/references/pr.md`

### Project operations

- [Image issue templates](https://github.com/daocloud/public-image-mirror/blob/main/.github/ISSUE_TEMPLATE/allows-image.yml): `.github/ISSUE_TEMPLATE/allows-image.yml`
- [Gitee image issue template](https://github.com/daocloud/public-image-mirror/blob/main/.gitee/ISSUE_TEMPLATE/allows-image.yml): `.gitee/ISSUE_TEMPLATE/allows-image.yml`
- [Sync issue template](https://github.com/daocloud/public-image-mirror/blob/main/.github/ISSUE_TEMPLATE/sync-image.yml): `.github/ISSUE_TEMPLATE/sync-image.yml`
- [Repository automation](https://github.com/daocloud/public-image-mirror/tree/main/.github/workflows): `.github/workflows`
- [Allowlist update workflow](https://github.com/daocloud/public-image-mirror/blob/main/.github/workflows/update-allows-list.yml): `.github/workflows/update-allows-list.yml`

### Other components

- **Image consumer**
- **Image contributors**

## Connections

- Image consumer → Mirror service: pulls through (evidence: `README.md`)
- Mirror service → Upstream registry: mirrors images (evidence: `README.md`)
- Mirror service → Image cache: caches content (evidence: `README.md`)
- Image consumer → Local cache deployment: deploys guidance (evidence: `README.md`)
- Image contributors → Image contribution guidance: follows
- Image contribution guidance → Applicant guidance: references
- Image contribution guidance → Approver guidance: references
- Image contribution guidance → PR guidance: references
- Image contributors → Image issue templates: submits request (evidence: `README.md`)
- Image contributors → Gitee image issue template: submits request (evidence: `README.md`)
- Image contributors → Sync issue template: reports sync issue (evidence: `README.md`)
- Repository automation → Allowlist update workflow: includes workflow
- Allowlist update workflow → Allowlist: updates
- Local cache deployment → Local cache documentation: documented by (evidence: `README.md`)
