# tech-shrimp/docker_installer architecture

> Architecture diagram of the GitHub repository tech-shrimp/docker_installer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tech-shrimp/docker_installer
- Repository: https://github.com/tech-shrimp/docker_installer

## Overview

##### Project Type and Purpose
- This is an open-source tooling repository whose primary goal is to mirror and redistribute the official Docker installation scripts and binaries for domestic Chinese users.
- Its core feature is a scheduled GitHub Actions workflow that downloads the official installer packages from Docker’s servers every day and publishes them as GitHub (and optionally Gitee) Releases. End users (Linux, Windows, Mac) then install Docker using those mirrored assets or by configuring registry-mirrors in their Docker daemon.

##### File Structure
- Top-level files and directories
- .github/workflows/docker.yaml – defines the scheduled CI job.
- README.md – user documentation and usage instructions.
- images/ – screenshots used in the README.
- No traditional “src” or “app” folders since this is a script-and-workflow repository.
- The presence of “docker.yaml” in workflows indicates an automated sync process (cron job).

##### Extract Insights from the README
- The repository periodically fetches the official Docker install scripts/packages.
- Provides one-line installers that point to GitHub/Gitee Releases as mirrors.
- Guides users through installation on Linux, Windows (WSL2), and Mac, including how to configure registry mirrors for container image pulls.
- Mentions ancillary tools/projects for pushing images to Aliyun and other mirror providers.

a. Main Components
- GitHub Repository – stores the workflow and documentation.
- GitHub Actions (docker.yaml) – scheduled job that runs daily.
- Official Docker Servers – the source of the true upstream install scripts/binaries.
- GitHub Releases (and Gitee mirror) – where mirrored installers are published.
- End-User Clients:
– Linux hosts (curl installation script)
– Windows hosts (WSL2 + Docker Desktop installer)
– Mac hosts (Intel/ARM installer)
- Registry-mirrors (Aliyun, 1Panel, DaoCloud, RatHub) – configured for image pulls.
b. Interactions and Data Flows
1. Cron trigger in GitHub Actions runs docker.yaml.
2. Action downloads official installer assets from Docker’s domain.
3. Action publishes those assets to GitHub Releases (and optionally to Gitee).
4. End users run curl|bash commands pointing to either get.docker.com (with mirror flag) or to this project’s Release URLs.
5. Users configure /etc/docker/daemon.json or Docker Engine settings to use the recommended registry-mirrors for pulling container images.
c. Architectural Patterns and Principles
- Automation via CI/CD (GitHub Actions) ensures freshness and eliminates manual mirror updates.
- Clear separation between “upstream fetcher” (the action) and “consumer endpoint” (the Releases).
- Extensibility: can add additional mirror hosts or target platforms by extending the workflow and scripts.
d. Key Technologies and Frameworks
- GitHub Actions for automation.
- curl + bash for one-line installers.
- GitHub Releases and Gitee as artifact hosting.
- Docker Engine configuration for registry-mirrors.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "GitHub Repository"
        Repo["GitHub Repository"]:::internal
        Actions["GitHub Actions (Scheduled CI Job)"]:::internal
        Docs["Documentation (README.md)"]:::internal
        Assets["Screenshot Assets"]:::internal
    end

    Official["Official Docker Servers"]:::external
    GitHubReleases["GitHub Releases"]:::external
    Gitee["Gitee Mirror"]:::external

    subgraph "End-User Clients"
        Linux["Linux Host"]:::client
        Windows["Windows Host (WSL2)"]:::client
        Mac["Mac Host (Intel/ARM)"]:::client
    end

    subgraph "Registry Mirrors"
        Aliyun["Aliyun"]:::external
        Panel["1Panel"]:::external
        DaoCloud["DaoCloud"]:::external
        RatHub["RatHub"]:::external
    end

    %% Data Flows
    Repo --> Actions
    Actions -->|"daily cron trigger"| Actions
    Official -->|"download installers (HTTPS)"| Actions
    Actions -->|"publish installers"| GitHubReleases
    Actions -->|"publish installers"| Gitee

    GitHubReleases -->|"install scripts/binaries (HTTPS)"| Linux
    GitHubReleases -->|"install scripts/binaries (HTTPS)"| Windows
    GitHubReleases -->|"install scripts/binaries (HTTPS)"| Mac

    Linux -->|"configure /etc/docker/daemon.json"| Aliyun
    Linux -->|"configure /etc/docker/daemon.json"| Panel
    Linux -->|"configure /etc/docker/daemon.json"| DaoCloud
    Linux -->|"configure /etc/docker/daemon.json"| RatHub

    Windows -->|"configure Docker Engine settings"| Aliyun
    Windows -->|"configure Docker Engine settings"| Panel
    Windows -->|"configure Docker Engine settings"| DaoCloud
    Windows -->|"configure Docker Engine settings"| RatHub

    Mac -->|"configure Docker Engine settings"| Aliyun
    Mac -->|"configure Docker Engine settings"| Panel
    Mac -->|"configure Docker Engine settings"| DaoCloud
    Mac -->|"configure Docker Engine settings"| RatHub

    %% Click Events
    click Actions "https://github.com/tech-shrimp/docker_installer/blob/main/.github/workflows/docker.yaml"
    click Docs "https://github.com/tech-shrimp/docker_installer/blob/main/README.md"
    click Assets "https://github.com/tech-shrimp/docker_installer/tree/main/images/"
    click Repo "https://github.com/tech-shrimp/docker_installer/blob/main/."

    %% Styles
    classDef internal fill:#E3F2FD,stroke:#2196F3;
    classDef external fill:#FFEBEE,stroke:#E53935;
    classDef client fill:#E8F5E9,stroke:#43A047;
```
