Skip to content

本项目用于将 Docker 镜像同步到 GitHub 的仓库 ghcr.io 以加速国内 Docker 镜像的下载,若ghcr.io下载速度慢可尝试使用南京大学加速站 ghcr.nju.edu.cn 加速下载。

Notifications You must be signed in to change notification settings

sqing33/docker-image-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,778 Commits
 
 
 
 
 
 

Repository files navigation

🚀 Docker 镜像工具箱:构建与同步

本项目是一个 GitHub Actions 工作流集合,旨在提供一站式的 Docker 镜像管理方案。

它主要包含两大核心功能:

  1. 从 Git 仓库构建多架构镜像:拉取任意 Git 仓库的源代码,自动构建支持多种 CPU 架构(如 amd64, arm64)的 Docker 镜像,并将其推送到 Docker Hub 和 GitHub Packages (ghcr.io)。
  2. 同步公共镜像以加速下载:将 Docker Hub 等公共仓库的镜像同步到自己的 ghcr.io 仓库,以加速在中国大陆等地区的镜像拉取速度。如果 ghcr.io 速度仍不理想,可配合南京大学加速站 ghcr.nju.edu.cn 使用。

✨ 主要功能

  • 双重核心:集镜像的 构建同步 功能于一身,满足不同场景的需求。
  • 手动触发:所有工作流均可在 Actions 页面通过简单的表单手动启动。
  • 多架构支持:轻松构建 linux/amd64, linux/arm64, linux/arm/v7 等多种 CPU 架构的镜像。
  • 多仓库推送:一次构建,自动将镜像推送到 GitHub Packages (ghcr.io) 和 Docker Hub。
  • 自动更新:为已同步的镜像提供每日自动更新机制,确保您使用的版本始终最新。
  • 结果自动化:工作流执行成功后,会自动更新本 README.md 文件中的镜像列表。
  • 安全可靠:通过 GitHub 的加密 Secrets 安全管理您的私人凭证,避免硬编码风险。

🛠️ 首次安装与配置

为了让所有功能正常工作,最安全、最推荐的使用方式是 Fork 本项目到您自己的 GitHub 账户下,然后完成以下一次性配置。

步骤 1: Fork 本项目

🍴 点击本项目页面右上角的 "Fork" 按钮,将此仓库复制一份到您自己的账户下。后续所有操作都将在您 Fork 后的仓库中进行。

步骤 2: 配置仓库权限

🔐 这是让 Actions 能够自动修改 README.md 和管理镜像的关键。

  1. 在您 Fork 后的仓库页面,点击 "Settings" -> "Actions" -> "General"
  2. Workflow permissions 区域,选择 "Read and write permissions"
  3. 勾选 "Allow GitHub Actions to create and approve pull requests"
  4. 点击 "Save" 保存设置。

步骤 3: 设置 Docker Hub 凭证

🔑 此步骤是可选的,但如果您希望使用构建功能并将镜像推送到 Docker Hub,则必须完成此设置。

  1. 在您 Fork 后的仓库页面,点击 "Settings" -> "Secrets and variables" -> "Actions"

  2. 点击 "New repository secret" 按钮,创建以下两个 Secrets:

    • DOCKERHUB_USERNAME

      • : 您的 Docker Hub 用户名。
    • DOCKERHUB_TOKEN

      • : 您的 Docker Hub 访问令牌 (Access Token)。强烈建议使用 Access Token 而非账户密码
      • 如何获取 Access Token? 登录 Docker Hub,进入 "Account Settings" -> "Security" -> "New Access Token" 来生成一个。

🏗️ 功能一:从 Git 仓库构建多架构镜像

此功能会拉取一个指定的 Git 仓库,将其构建为 Docker 镜像,并推送到 ghcr.io 和 Docker Hub。

如何触发

  1. 在您的仓库页面,点击顶部的 "Actions" 标签页。
  2. 在左侧列表中,点击 构建 Docker 镜像 → ghcr.io, DockerHub 工作流。
  3. 点击右侧的 "Run workflow" 下拉按钮,填写参数后即可开始构建。

⚙️ 输入参数

参数 (Parameter) 描述 (Description) 是否必需 默认值
repo_url 包含 Dockerfile 的 Git 仓库克隆链接。例如:https://github.com/user/repo.git
repo_ref 要克隆的仓库的分支、标签或 Commit SHA。例如:main, v1.2.0 main
image_name 您希望为镜像设定的名称。例如:my-web-app my-app
tags 要为镜像打上的标签,多个标签用逗号 , 分隔。例如:latest,v1.0 latest
platforms 要构建的 CPU 架构列表,用逗号 , 分隔。 linux/amd64,linux/arm64,linux/arm/v7

🔄 功能二:同步公共镜像以加速下载

此功能用于将 Docker Hub 等公共仓库的镜像同步到你的 ghcr.io,方便国内网络环境快速拉取。

如何触发

  1. 在您的仓库页面,点击顶部的 "Actions" 标签页。
  2. 在左侧列表中,点击 将 Docker 镜像同步到 ghcr.io 工作流。
  3. 点击右侧的 "Run workflow" 下拉按钮,填写参数后即可开始同步。

⚙️ 输入参数

参数 (Parameter) 描述 (Description) 是否必需 默认值
images 要同步的 Docker 镜像列表,用逗号 , 分隔。格式为 镜像名:标签
ghcr_names (可选)为同步后的镜像指定新名称,用逗号 , 分隔。
change_tag_to_latest 是否将同步后的镜像标签强制改为 latest

📊 查看结果与镜像管理

  • 查看列表: 任何成功的构建或同步任务都会自动更新下方的镜像列表。
  • 管理镜像: 若要查看或删除已同步或构建的镜像,可访问您的 GitHub 个人首页(例如 https://github.com/user),点击 "Packages" 即可查看和管理所有镜像。

⏰ 自动更新机制

本仓库设置了自动更新机制,每天 UTC 时间下午 4 点(北京时间午夜 12 点)会自动从源镜像仓库拉取最新版本。

请注意:此自动更新功能仅对 本仓库已同步的 Docker 镜像 表格中,同步 列被标记为 ✔️ 的镜像有效。

🗂️ 本仓库的镜像列表

已构建的 Docker 镜像

源仓库 镜像名称 构建时间
1 https://github.com/sqing33/docker-docsify ghcr.io/sqing33/docsify
sqing33/docsify
2025-05-15
2 https://github.com/sqing33/docker-image-sync-to-registry ghcr.io/sqing33/docker-image-sync-to-registry
sqing33/docker-image-sync-to-registry
2025-06-03
3 https://github.com/sqing33/Docker.pt-nexus.git ghcr.io/sqing33/pt-nexus
sqing33/pt-nexus
2025-09-12
4 https://github.com/sqing33/Docker.Code-dev-env.git ghcr.io/sqing33/code-dev-env
sqing33/code-dev-env
2025-10-01

| 5 | https://github.com/sqing33/Doraemon.git | ghcr.io/sqing33/doraemon
sqing33/doraemon | 2026-01-03 | | 6 | https://github.com/sqing33/SqingBlog.git | ghcr.io/sqing33/SQBlog
sqing33/SQBlog | 2026-01-21 | | 7 | https://github.com/zeroclaw-labs/zeroclaw | ghcr.io/sqing33/zeroclaw
sqing33/zeroclaw | 2026-02-21 |

已同步的 Docker 镜像

源镜像 pull 镜像 docker-compose 同步 更新时间
1 adminer ghcr.io/sqing33/adminer yaml ✔️ 2026-02-14
2 justlikemaki/aiclient-2-api ghcr.io/sqing33/aiclient2api yaml ✔️ 2026-02-20
3 sqing33/argb-fan-esp32 ghcr.io/sqing33/argb-fan-esp32 yaml ✔️ 2025-08-25
4 jauderho/docker-autocompose ghcr.io/sqing33/autocompose yaml ✔️ 2026-02-25
5 garethgeorge/backrest ghcr.io/sqing33/backrest yaml ✔️ 2026-02-22
6 henrygd/beszel ghcr.io/sqing33/beszel yaml ✔️ 2026-02-21
7 amtoaer/bili-sync-rs ghcr.io/sqing33/bili-sync-rs yaml ✔️ 2026-02-25
8 vaultwarden/server ghcr.io/sqing33/bitwardenrs yaml ✔️ 2026-02-24
9 moby/buildkit ghcr.io/sqing33/buildkit yaml ✔️ 2026-01-29
10 oven/bun ghcr.io/sqing33/bun yaml ✔️
11 tindy2013/subconverter ghcr.io/sqing33/clash-subconverter yaml ✔️ 2026-01-11
12 metacubex/clash-meta ghcr.io/sqing33/clash yaml
13 linuxserver/code-server ghcr.io/sqing33/code-server yaml ✔️ 2026-02-22
14 ghcr.io/coracoo/dockports ghcr.io/sqing33/convertx yaml ✔️
15 easychen/cookiecloud ghcr.io/sqing33/cookiecloud yaml ✔️ 2025-08-25
16 jeessy/ddns-go ghcr.io/sqing33/ddns-go yaml ✔️ 2026-01-17
17 langgenius/dify-api ghcr.io/sqing33/dify-api yaml ✔️ 2026-02-11
18 langgenius/dify-plugin-daemon:latest-local ghcr.io/sqing33/dify-plugin-daemon yaml
19 langgenius/dify-sandbox ghcr.io/sqing33/dify-sandbox yaml ✔️
20 langgenius/dify-web ghcr.io/sqing33/dify-web yaml ✔️ 2026-02-11
21 ihmily/douyin-live-recorder ghcr.io/sqing33/douyin-live-recorder yaml ✔️
22 leishi1313/downloader-exporter ghcr.io/sqing33/downloader-exporter yaml ✔️
23 dpanel/dpanel ghcr.io/sqing33/dpanel yaml ✔️ 2026-01-13
24 lscr.io/linuxserver/duplicati ghcr.io/sqing33/duplicati yaml ✔️ 2026-02-21
25 registry.cn-shanghai.aliyuncs.com/rustc/easynvr_amd64 ghcr.io/sqing33/easynvr yaml ✔️
26 lscr.io/linuxserver/emby ghcr.io/sqing33/emby yaml ✔️ 2026-02-20
27 quay.io/coreos/etcd:v3.5.18 ghcr.io/sqing33/etcd yaml
28 linuxserver/firefox ghcr.io/sqing33/firefox yaml ✔️ 2026-02-22
29 lscr.io/linuxserver/flexget ghcr.io/sqing33/flexget yaml ✔️ 2026-02-25
30 forgejoclone/forgejo:13 ghcr.io/sqing33/forgejo yaml
31 ghcr.io/snailyp/gemini-balance ghcr.io/sqing33/gemini-balance yaml ✔️ 2025-09-23
32 liwei2633/gopeed ghcr.io/sqing33/gopeed yaml ✔️ 2026-02-08
33 gotify/server ghcr.io/sqing33/gotify yaml ✔️ 2026-02-13
34 ghcr.io/tbphp/gpt-load ghcr.io/sqing33/gpt-load yaml ✔️ 2026-02-16
35 grafana/grafana ghcr.io/sqing33/grafana yaml ✔️ 2026-02-24
36 registry.fit2cloud.com/halo/halo-pro:2.22 ghcr.io/sqing33/halo yaml
37 haproxy ghcr.io/sqing33/haproxy yaml ✔️ 2026-02-25
38 homeassistant/home-assistant ghcr.io/sqing33/homeassistant yaml ✔️ 2026-02-21
39 ghcr.io/gethomepage/homepage ghcr.io/sqing33/homepage yaml ✔️ 2026-02-05
40 corentinth/it-tools ghcr.io/sqing33/it-tools yaml ✔️
41 iyuucn/iyuuplus ghcr.io/sqing33/iyuu yaml ✔️ 2026-02-20
42 lscr.io/linuxserver/jackett ghcr.io/sqing33/jackett yaml ✔️ 2026-02-25
43 jellyfin/jellyfin ghcr.io/sqing33/jellyfin yaml ✔️ 2026-01-19
44 jupyter/scipy-notebook ghcr.io/sqing33/jupyterlab yaml ✔️ 2025-08-25
45 bytelang/kplayer ghcr.io/sqing33/kplayer yaml ✔️
46 dko0/lsky-pro ghcr.io/sqing33/lsky yaml ✔️
47 gdy666/lucky ghcr.io/sqing33/lucky yaml ✔️ 2025-11-11
48 woodchen/lxmusicsyncserver ghcr.io/sqing33/lxmusic-sync-server yaml ✔️
49 mariadb ghcr.io/sqing33/mariadb yaml ✔️ 2026-02-18
50 docker/mcp-gateway ghcr.io/sqing33/mcp-gateway yaml ✔️ 2026-02-23
51 ghcr.io/metacubex/metacubexd ghcr.io/sqing33/metacubexd yaml ✔️ 2026-02-14
52 idootop/migpt-next ghcr.io/sqing33/migpt yaml ✔️
53 metacubex/mihomo ghcr.io/sqing33/mihomo yaml ✔️ 2026-02-08
54 continuumio/miniconda3 ghcr.io/sqing33/miniconda3 yaml ✔️ 2026-01-27
55 minio/minio:RELEASE.2023-03-20T20-16-18Z ghcr.io/sqing33/minio yaml
56 l429609201/misaka_danmu_server ghcr.io/sqing33/misaka_danmu_server yaml ✔️ 2026-02-25
57 mongodb/mongodb-community-server ghcr.io/sqing33/mongodb yaml ✔️ 2026-02-25
58 jxxghp/moviepilot-v2 ghcr.io/sqing33/moviepilot yaml ✔️ 2026-02-24
59 mysql:9.3.0 ghcr.io/sqing33/mysql yaml
60 mlikiowa/napcat-docker ghcr.io/sqing33/napcat yaml ✔️ 2026-02-22
61 calciumion/new-api ghcr.io/sqing33/new-api yaml ✔️ 2026-02-25
62 tiangolo/nginx-rtmp ghcr.io/sqing33/nginx-rtmp yaml ✔️ 2026-02-23
63 nginx:alpine ghcr.io/sqing33/nginx:alpine yaml ✔️ 2026-02-25
64 nginx ghcr.io/sqing33/nginx yaml ✔️ 2026-02-25
65 prom/node-exporter ghcr.io/sqing33/node-exporter yaml ✔️ 2025-10-26
66 node:alpine ghcr.io/sqing33/node:alpine yaml ✔️ 2026-02-25
67 node ghcr.io/sqing33/node yaml ✔️ 2026-02-25
68 lampon/omnibox ghcr.io/sqing33/omnibox yaml ✔️
69 xiguanle/openlist ghcr.io/sqing33/openlist yaml ✔️ 2025-11-26
70 openspeedtest/latest ghcr.io/sqing33/openspeedtest yaml ✔️ 2025-08-25
71 pgvector/pgvector:0.8.0-pg17 ghcr.io/sqing33/postgres yaml
72 prom/prometheus ghcr.io/sqing33/prometheus yaml ✔️ 2026-01-22
73 lscr.io/linuxserver/prowlarr ghcr.io/sqing33/prowlarr yaml ✔️ 2026-02-11
74 linuxserver/qbittorrent ghcr.io/sqing33/qbittorrent yaml ✔️ 2026-02-22
75 qdtoday/qd ghcr.io/sqing33/qd yaml ✔️ 2025-08-25
76 whyour/qinglong ghcr.io/sqing33/qinglong yaml ✔️ 2025-12-26
77 redis:7.2-alpine ghcr.io/sqing33/redis:alpine yaml ✔️ 2026-02-25
78 redis ghcr.io/sqing33/redis yaml ✔️ 2026-02-25
79 quiq/registry-ui ghcr.io/sqing33/registry-ui yaml ✔️ 2026-02-16
80 registry:2 ghcr.io/sqing33/registry yaml
81 szzhoubanxian/reseed-puppy ghcr.io/sqing33/reseed-puppy yaml ✔️
82 steefdebruijn/docker-roonserver ghcr.io/sqing33/roonserver yaml ✔️ 2025-12-29
83 dperson/samba ghcr.io/sqing33/samba yaml ✔️
84 ccf2012/seedcross ghcr.io/sqing33/seedcross yaml ✔️
85 apkdv/siyuan-unlock ghcr.io/sqing33/siyuan yaml ✔️ 2026-02-24
86 ghostry/smartdns ghcr.io/sqing33/smartdns yaml ✔️
87 metacubex/subconverter ghcr.io/sqing33/subconverter yaml ✔️ 2026-02-10
88 stilleshan/subweb ghcr.io/sqing33/subweb yaml ✔️
89 hslr/sun-panel ghcr.io/sqing33/sun-panel yaml ✔️ 2025-12-31
90 syncthing/syncthing ghcr.io/sqing33/syncthing yaml ✔️ 2026-02-03
91 linuxserver/transmission:4.0.5 ghcr.io/sqing33/transmission yaml
92 mzz2017/v2raya ghcr.io/sqing33/v2raya yaml ✔️ 2026-01-25
93 ghcr.io/vert-sh/vert ghcr.io/sqing33/vert yaml ✔️ 2026-02-25
94 ghcr.io/vert-sh/vertd ghcr.io/sqing33/vertd yaml ✔️
95 lswl/vertex ghcr.io/sqing33/vertex yaml ✔️ 2026-02-12
96 containrrr/watchtower ghcr.io/sqing33/watchtower yaml ✔️
97 wiznote/wizserver ghcr.io/sqing33/wizserver yaml ✔️ 2025-10-30
98 hanxi/xiaomusic ghcr.io/sqing33/xiaomusic yaml ✔️ 2026-02-17
99 haishanh/yacd ghcr.io/sqing33/yacd yaml ✔️ 2025-08-26
100 siguremo/yutto ghcr.io/sqing33/yutto-bilibili_downloads yaml ✔️ 2025-11-28
101 ghcr.io/zephyruso/zashboard ghcr.io/sqing33/zashboard yaml ✔️ 2026-02-24

About

本项目用于将 Docker 镜像同步到 GitHub 的仓库 ghcr.io 以加速国内 Docker 镜像的下载,若ghcr.io下载速度慢可尝试使用南京大学加速站 ghcr.nju.edu.cn 加速下载。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages