From e8046ce6f77415595b819505bb564f721aeb989c Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Fri, 13 Mar 2026 03:23:55 +0000 Subject: [PATCH 1/5] Add GitHub Actions workflow for syncing Docker images and update README and images configuration --- .github/workflows/task-sync.yml | 41 +++++++++++++++++ task-sync-docker-images/README.md | 32 +++++++++++++ task-sync-docker-images/images.yaml | 70 +++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 .github/workflows/task-sync.yml create mode 100644 task-sync-docker-images/README.md create mode 100644 task-sync-docker-images/images.yaml diff --git a/.github/workflows/task-sync.yml b/.github/workflows/task-sync.yml new file mode 100644 index 0000000..cae069b --- /dev/null +++ b/.github/workflows/task-sync.yml @@ -0,0 +1,41 @@ +name: sync-docker-images + +on: + push: + branches: [ "main" ] + paths-ignore: [ "*.md" ] + pull_request: + branches: [ "main" ] + paths-ignore: [ "*.md" ] + workflow_dispatch: # Allows you to run this workflow manually from the Actions tab + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + BUILDKIT_PROGRESS: "plain" # Full logs for CI build. + REGISTRY_SRC: ${{ vars.REGISTRY_SRC || 'docker.io' }} # For BASE_NAMESPACE of images: where to pull base images from, docker.io or other source registry URL. + REGISTRY_DST: ${{ vars.REGISTRY_DST || 'docker.io' }} # For tags of built images: where to push images to, docker.io or other destination registry URL. + # DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets. + DOCKER_REGISTRY_USERNAME: ${{ vars.DOCKER_REGISTRY_USERNAME }} + DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} + # used to sync image to mirror registry + DOCKER_MIRROR_REGISTRY_USERNAME: ${{ vars.DOCKER_MIRROR_REGISTRY_USERNAME }} + DOCKER_MIRROR_REGISTRY_PASSWORD: ${{ secrets.DOCKER_MIRROR_REGISTRY_PASSWORD }} + +jobs: + ## Sync all images in this build (listed by "names") to mirror registry. + sync_images: + # needs: [] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - env: + AUTH_FILE_CONTENT: ${{ secrets.AUTH_FILE_CONTENT }} + run: | + source ./tool.sh && ls -alh ./ + printf '%s' "$AUTH_FILE_CONTENT" > .github/workflows/auth.json && ls -alh ./.github/workflows + printenv | grep -v 'PATH' > /tmp/docker.env && echo "REGISTRY_URL=${REGISTRY_DST}" >> /tmp/docker.env + docker run --rm --env-file /tmp/docker.env -v $(pwd):/tmp -w /tmp qpod/docker-kit \ + image-syncer --proc=8 --retries=2 --images /tmp/task_sync_imgs/images.yaml --auth /tmp/.github/workflows/auth.json diff --git a/task-sync-docker-images/README.md b/task-sync-docker-images/README.md new file mode 100644 index 0000000..687edc5 --- /dev/null +++ b/task-sync-docker-images/README.md @@ -0,0 +1,32 @@ +# Task Sync Docker Images + +This task sync docker images from source registries to target registries based on the configuration files. + +```shell +docker run -it --rm -v $(pwd):/root/app -w /root/app docker.io/qpod/docker-kit + +image-syncer --proc=8 --retries=2 --images ./images.yaml --auth ./auth.json +``` + +To sync images in batch, two config files (or combine them in one as `--config`) are needed. + +The `auth.yaml` file should look like: + +```yaml +docker.io: + username: "" + password: "" + insecure: true +registry.cn-hangzhou.aliyuncs.com: + username: "" + password: "" + insecure: true +``` + +The `images.yaml` file should look like: + +```yaml +quay.io/qpod/docker-kit: + - docker.io/qpod/docker-kit + - registry.cn-hangzhou.aliyuncs.com/qpod/docker-kit +``` diff --git a/task-sync-docker-images/images.yaml b/task-sync-docker-images/images.yaml new file mode 100644 index 0000000..e335651 --- /dev/null +++ b/task-sync-docker-images/images.yaml @@ -0,0 +1,70 @@ +# Ref: https://github.com/AliyunContainerService/image-syncer/blob/master/README-zh_CN.md + +# nvidia/cuda: https://hub.docker.com/r/nvidia/cuda/tags +docker.io/nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04,12.4.1-cudnn-devel-ubuntu22.04,12.0.1-cudnn8-devel-ubuntu22.04,11.8.0-cudnn8-devel-ubuntu22.04,11.2.2-cudnn8-devel-ubuntu20.04: + - quay.io/labnow/nvidia-cuda + - registry.cn-hangzhou.aliyuncs.com/labnow/nvidia-cuda + - registry.cn-beijing.aliyuncs.com/labnow/nvidia-cuda + + +# Elasticserach +# - ref1: https://github.com/elastic/elasticsearch/releases +# - ref2: https://www.elastic.co/docs/deploy-manage/deploy/self-managed/install-elasticsearch-with-docker +docker.elastic.co/elasticsearch/elasticsearch:7.17.28,8.11.3,8.17.5,8.18.0,9.0.0: + - quay.io/labnow/elasticsearch + - registry.cn-hangzhou.aliyuncs.com/labnow/elasticsearch + - registry.cn-beijing.aliyuncs.com/labnow/elasticsearch + + +# Minio +# - ref1: https://github.com/minio/minio/releases +# - ref2: https://min.io/docs/minio/container/index.html +docker.io/minio/minio:latest,RELEASE.2023-12-20T01-00-02Z,RELEASE.2025-04-08T15-41-24Z: + - quay.io/labnow/minio + - registry.cn-hangzhou.aliyuncs.com/labnow/minio + - registry.cn-beijing.aliyuncs.com/labnow/minio + + +# valkey +# - ref1: https://github.com/valkey-io/valkey/releases +# - ref2: https://hub.docker.com/r/valkey/valkey +docker.io/valkey/valkey:latest,8,8.1,8.1.0: + - quay.io/labnow/valkey + - registry.cn-hangzhou.aliyuncs.com/labnow/valkey + - registry.cn-beijing.aliyuncs.com/labnow/valkey + + +# k3s +# - ref1: https://github.com/k3s-io/k3s/releases +# - ref2: https://docs.k3s.io/installation/airgap +rancher/k3s:latest,v1.32.3-k3s1: + - quay.io/labnow/k3s + - registry.cn-hangzhou.aliyuncs.com/labnow/k3s + - registry.cn-beijing.aliyuncs.com/labnow/k3s + + +# k3d: https://github.com/k3d-io/k3d/pkgs/container/k3d +ghcr.io/k3d-io/k3d:latest,5-dind,5: + - quay.io/labnow/k3s + - registry.cn-hangzhou.aliyuncs.com/labnow/k3d + - registry.cn-beijing.aliyuncs.com/labnow/k3d + + +# k3d-proxy:https://github.com/k3d-io/k3d/pkgs/container/k3d-proxy +ghcr.io/k3d-io/k3d-proxy:latest,5: + - quay.io/labnow/k3s + - registry.cn-hangzhou.aliyuncs.com/labnow/k3d-proxy + - registry.cn-beijing.aliyuncs.com/labnow/k3d-proxy + + +# k3d-tools: https://github.com/k3d-io/k3d/pkgs/container/k3d-tools +ghcr.io/k3d-io/k3d-tools:latest,5: + - quay.io/labnow/k3s + - registry.cn-hangzhou.aliyuncs.com/labnow/k3d-tools + - registry.cn-beijing.aliyuncs.com/labnow/k3d-tools + +# kube-scheduler +registry.k8s.io/kube-scheduler:/v\d+\.\d+\.\d+/: + - quay.io/labnow/kube-scheduler + - registry.cn-hangzhou.aliyuncs.com/labnow/kube-scheduler + - registry.cn-beijing.aliyuncs.com/labnow/kube-scheduler From f9ea510e6fb50184dbb9eb675176521984bfa403 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Fri, 13 Mar 2026 04:58:19 +0000 Subject: [PATCH 2/5] update sync --- .github/workflows/task-sync.yml | 21 ++++++--------------- task-sync-docker-images/README.md | 8 ++++---- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/task-sync.yml b/.github/workflows/task-sync.yml index cae069b..2b7ba80 100644 --- a/.github/workflows/task-sync.yml +++ b/.github/workflows/task-sync.yml @@ -13,17 +13,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -env: - BUILDKIT_PROGRESS: "plain" # Full logs for CI build. - REGISTRY_SRC: ${{ vars.REGISTRY_SRC || 'docker.io' }} # For BASE_NAMESPACE of images: where to pull base images from, docker.io or other source registry URL. - REGISTRY_DST: ${{ vars.REGISTRY_DST || 'docker.io' }} # For tags of built images: where to push images to, docker.io or other destination registry URL. - # DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets. - DOCKER_REGISTRY_USERNAME: ${{ vars.DOCKER_REGISTRY_USERNAME }} - DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} - # used to sync image to mirror registry - DOCKER_MIRROR_REGISTRY_USERNAME: ${{ vars.DOCKER_MIRROR_REGISTRY_USERNAME }} - DOCKER_MIRROR_REGISTRY_PASSWORD: ${{ secrets.DOCKER_MIRROR_REGISTRY_PASSWORD }} - jobs: ## Sync all images in this build (listed by "names") to mirror registry. sync_images: @@ -34,8 +23,10 @@ jobs: - env: AUTH_FILE_CONTENT: ${{ secrets.AUTH_FILE_CONTENT }} run: | - source ./tool.sh && ls -alh ./ printf '%s' "$AUTH_FILE_CONTENT" > .github/workflows/auth.json && ls -alh ./.github/workflows - printenv | grep -v 'PATH' > /tmp/docker.env && echo "REGISTRY_URL=${REGISTRY_DST}" >> /tmp/docker.env - docker run --rm --env-file /tmp/docker.env -v $(pwd):/tmp -w /tmp qpod/docker-kit \ - image-syncer --proc=8 --retries=2 --images /tmp/task_sync_imgs/images.yaml --auth /tmp/.github/workflows/auth.json + printenv | grep -v 'PATH' > /tmp/docker.env + docker run --rm --env-file /tmp/docker.env -v $(pwd):/tmp -w /tmp\ + labnow/docker-kit \ + image-syncer --proc=8 --retries=2 \ + --images /tmp/task-sync-docker-images/images.yaml \ + --auth /tmp/.github/workflows/auth.json diff --git a/task-sync-docker-images/README.md b/task-sync-docker-images/README.md index 687edc5..0ce1184 100644 --- a/task-sync-docker-images/README.md +++ b/task-sync-docker-images/README.md @@ -3,7 +3,7 @@ This task sync docker images from source registries to target registries based on the configuration files. ```shell -docker run -it --rm -v $(pwd):/root/app -w /root/app docker.io/qpod/docker-kit +docker run -it --rm -v $(pwd):/root/app -w /root/app docker.io/labnow/docker-kit image-syncer --proc=8 --retries=2 --images ./images.yaml --auth ./auth.json ``` @@ -26,7 +26,7 @@ registry.cn-hangzhou.aliyuncs.com: The `images.yaml` file should look like: ```yaml -quay.io/qpod/docker-kit: - - docker.io/qpod/docker-kit - - registry.cn-hangzhou.aliyuncs.com/qpod/docker-kit +quay.io/labnow/docker-kit: + - docker.io/labnow/docker-kit + - registry.cn-hangzhou.aliyuncs.com/labnow/docker-kit ``` From 75fbb08d8cab87a0ddcde62df4446b6717509b56 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Fri, 13 Mar 2026 05:10:12 +0000 Subject: [PATCH 3/5] update readme --- .github/workflows/task-sync.yml | 4 ++- README.md | 33 +++++++++++++++++- task-sync-docker-images/README.md | 56 ++++++++++++++----------------- 3 files changed, 60 insertions(+), 33 deletions(-) diff --git a/.github/workflows/task-sync.yml b/.github/workflows/task-sync.yml index 2b7ba80..fdd8b9f 100644 --- a/.github/workflows/task-sync.yml +++ b/.github/workflows/task-sync.yml @@ -25,7 +25,9 @@ jobs: run: | printf '%s' "$AUTH_FILE_CONTENT" > .github/workflows/auth.json && ls -alh ./.github/workflows printenv | grep -v 'PATH' > /tmp/docker.env - docker run --rm --env-file /tmp/docker.env -v $(pwd):/tmp -w /tmp\ + docker run --rm --env-file /tmp/docker.env \ + -e XDG_RUNTIME_DIR="" \ + -v $(pwd):/tmp -w /tmp\ labnow/docker-kit \ image-syncer --proc=8 --retries=2 \ --images /tmp/task-sync-docker-images/images.yaml \ diff --git a/README.md b/README.md index 1b39b43..0ce1184 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ -# tool-sync-docker-image \ No newline at end of file +# Task Sync Docker Images + +This task sync docker images from source registries to target registries based on the configuration files. + +```shell +docker run -it --rm -v $(pwd):/root/app -w /root/app docker.io/labnow/docker-kit + +image-syncer --proc=8 --retries=2 --images ./images.yaml --auth ./auth.json +``` + +To sync images in batch, two config files (or combine them in one as `--config`) are needed. + +The `auth.yaml` file should look like: + +```yaml +docker.io: + username: "" + password: "" + insecure: true +registry.cn-hangzhou.aliyuncs.com: + username: "" + password: "" + insecure: true +``` + +The `images.yaml` file should look like: + +```yaml +quay.io/labnow/docker-kit: + - docker.io/labnow/docker-kit + - registry.cn-hangzhou.aliyuncs.com/labnow/docker-kit +``` diff --git a/task-sync-docker-images/README.md b/task-sync-docker-images/README.md index 0ce1184..b75d6e0 100644 --- a/task-sync-docker-images/README.md +++ b/task-sync-docker-images/README.md @@ -1,32 +1,26 @@ -# Task Sync Docker Images - -This task sync docker images from source registries to target registries based on the configuration files. - -```shell -docker run -it --rm -v $(pwd):/root/app -w /root/app docker.io/labnow/docker-kit - -image-syncer --proc=8 --retries=2 --images ./images.yaml --auth ./auth.json -``` - -To sync images in batch, two config files (or combine them in one as `--config`) are needed. - -The `auth.yaml` file should look like: - -```yaml -docker.io: - username: "" - password: "" - insecure: true -registry.cn-hangzhou.aliyuncs.com: - username: "" - password: "" - insecure: true -``` - -The `images.yaml` file should look like: - -```yaml -quay.io/labnow/docker-kit: - - docker.io/labnow/docker-kit - - registry.cn-hangzhou.aliyuncs.com/labnow/docker-kit +# Understanding the docker images sync process + +如果需要手工来操作,可以在该目录下创建一个认证文件,例如: + +```auth.json +{ + "docker.io": { + "username": "", + "password": "", + "insecure": true + }, + "quay.io": { + "username": "", + "password": "", + "insecure": true + }, + "registry.cn-beijing.aliyuncs.com" : { + "username": "", + "password": "" + }, + "registry.cn-hangzhou.aliyuncs.com" : { + "username": "", + "password": "" + } +} ``` From e8a2bfc56b7e1dce3637b4cecc1b6e3cd3655771 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Fri, 13 Mar 2026 05:23:45 +0000 Subject: [PATCH 4/5] update img sync tasks --- README.md | 38 +++++++---------- task-sync-docker-images/README.md | 65 ++++++++++++++++++++++++++--- task-sync-docker-images/images.yaml | 36 ++++++++-------- 3 files changed, 92 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 0ce1184..b76fc40 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,22 @@ # Task Sync Docker Images -This task sync docker images from source registries to target registries based on the configuration files. +This repository provides an automated GitHub Actions workflow to sync container images from source registries to mirror registries. It is designed for teams that need repeatable, auditable image mirroring using a simple YAML configuration. -```shell -docker run -it --rm -v $(pwd):/root/app -w /root/app docker.io/labnow/docker-kit +## What This Project Does -image-syncer --proc=8 --retries=2 --images ./images.yaml --auth ./auth.json -``` +- Defines image mappings in `task-sync-docker-images/images.yaml`. +- Runs a GitHub Actions workflow that uses `image-syncer` inside `labnow/docker-kit`. +- Pushes images to target registries based on the mappings. -To sync images in batch, two config files (or combine them in one as `--config`) are needed. +## How to Use (Fork + Customize) -The `auth.yaml` file should look like: +1. Fork this repository to your own GitHub org or account. +2. Edit `task-sync-docker-images/images.yaml` to add or update the images and target registries you want to mirror. +3. Create a repository secret named `AUTH_FILE_CONTENT` containing your registry credentials in JSON format (see `task-sync-docker-images/README.md` for an example). +4. Trigger the workflow: + - Manually via the Actions tab using the `sync-docker-images` workflow. + - Or by pushing changes to `main` (the workflow ignores `*.md` changes). -```yaml -docker.io: - username: "" - password: "" - insecure: true -registry.cn-hangzhou.aliyuncs.com: - username: "" - password: "" - insecure: true -``` +## Manual Local Run -The `images.yaml` file should look like: - -```yaml -quay.io/labnow/docker-kit: - - docker.io/labnow/docker-kit - - registry.cn-hangzhou.aliyuncs.com/labnow/docker-kit -``` +If you want to run the sync locally (or in GitHub Codespaces), follow the instructions in `task-sync-docker-images/README.md`. diff --git a/task-sync-docker-images/README.md b/task-sync-docker-images/README.md index b75d6e0..9644d85 100644 --- a/task-sync-docker-images/README.md +++ b/task-sync-docker-images/README.md @@ -1,8 +1,63 @@ -# Understanding the docker images sync process +# Docker Images Sync (Task Module) -如果需要手工来操作,可以在该目录下创建一个认证文件,例如: +This module syncs container images to mirror registries using `image-syncer` running inside the `labnow/docker-kit` container. -```auth.json +## Overview + +The workflow reads the source/target mappings from `task-sync-docker-images/images.yaml` and pushes images to the configured mirror registries. + +## How the GitHub Actions Workflow Works + +The workflow is defined in `.github/workflows/task-sync.yml` and behaves as follows: + +- Triggers on push and pull request to `main`, ignoring changes to `*.md`. +- Supports manual runs via `workflow_dispatch`. +- Reads the `AUTH_FILE_CONTENT` secret and writes it to `.github/workflows/auth.json`. +- Runs `labnow/docker-kit` and executes: + `image-syncer --proc=8 --retries=2 --images /tmp/task-sync-docker-images/images.yaml --auth /tmp/.github/workflows/auth.json` + +## Manual Run via GitHub Actions + +1. Ensure the repository secret `AUTH_FILE_CONTENT` is set with the content of your auth file (JSON format). +2. Go to the Actions tab and run the `sync-docker-images` workflow using the "Run workflow" button. + +## Manual Local Run (or using Github Codespace) + +From the repo root, you can run the sync locally with docker-kit: + +```shell +docker run -it --rm -v "$(pwd):/root/app" -w /root/app docker.io/labnow/docker-kit \ + image-syncer --proc=8 --retries=2 --images ./task-sync-docker-images/images.yaml --auth ./auth.json +``` + +Use either `auth.json` or `auth.yaml` and pass the corresponding path with `--auth`. + +### images.yaml Example + +```yaml +quay.io/labnow/docker-kit: + - docker.io/labnow/docker-kit + - registry.cn-hangzhou.aliyuncs.com/labnow/docker-kit +``` + +### auth.yaml Example + +```yaml +docker.io: + username: "" + password: "" + insecure: true +registry.cn-hangzhou.aliyuncs.com: + username: "" + password: "" + insecure: true +``` + +### auth.json Example + +Notice: the `AUTH_FILE_CONTENT` use this format by compact the JSON string into a single line. + +```json { "docker.io": { "username": "", @@ -14,11 +69,11 @@ "password": "", "insecure": true }, - "registry.cn-beijing.aliyuncs.com" : { + "registry.cn-beijing.aliyuncs.com": { "username": "", "password": "" }, - "registry.cn-hangzhou.aliyuncs.com" : { + "registry.cn-hangzhou.aliyuncs.com": { "username": "", "password": "" } diff --git a/task-sync-docker-images/images.yaml b/task-sync-docker-images/images.yaml index e335651..7c0815f 100644 --- a/task-sync-docker-images/images.yaml +++ b/task-sync-docker-images/images.yaml @@ -3,8 +3,8 @@ # nvidia/cuda: https://hub.docker.com/r/nvidia/cuda/tags docker.io/nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04,12.4.1-cudnn-devel-ubuntu22.04,12.0.1-cudnn8-devel-ubuntu22.04,11.8.0-cudnn8-devel-ubuntu22.04,11.2.2-cudnn8-devel-ubuntu20.04: - quay.io/labnow/nvidia-cuda - - registry.cn-hangzhou.aliyuncs.com/labnow/nvidia-cuda - - registry.cn-beijing.aliyuncs.com/labnow/nvidia-cuda + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/nvidia-cuda + - registry.cn-beijing.aliyuncs.com/labnow-ai/nvidia-cuda # Elasticserach @@ -12,8 +12,8 @@ docker.io/nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04,12.4.1-cudnn-devel-ubuntu22 # - ref2: https://www.elastic.co/docs/deploy-manage/deploy/self-managed/install-elasticsearch-with-docker docker.elastic.co/elasticsearch/elasticsearch:7.17.28,8.11.3,8.17.5,8.18.0,9.0.0: - quay.io/labnow/elasticsearch - - registry.cn-hangzhou.aliyuncs.com/labnow/elasticsearch - - registry.cn-beijing.aliyuncs.com/labnow/elasticsearch + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/elasticsearch + - registry.cn-beijing.aliyuncs.com/labnow-ai/elasticsearch # Minio @@ -21,8 +21,8 @@ docker.elastic.co/elasticsearch/elasticsearch:7.17.28,8.11.3,8.17.5,8.18.0,9.0.0 # - ref2: https://min.io/docs/minio/container/index.html docker.io/minio/minio:latest,RELEASE.2023-12-20T01-00-02Z,RELEASE.2025-04-08T15-41-24Z: - quay.io/labnow/minio - - registry.cn-hangzhou.aliyuncs.com/labnow/minio - - registry.cn-beijing.aliyuncs.com/labnow/minio + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/minio + - registry.cn-beijing.aliyuncs.com/labnow-ai/minio # valkey @@ -30,8 +30,8 @@ docker.io/minio/minio:latest,RELEASE.2023-12-20T01-00-02Z,RELEASE.2025-04-08T15- # - ref2: https://hub.docker.com/r/valkey/valkey docker.io/valkey/valkey:latest,8,8.1,8.1.0: - quay.io/labnow/valkey - - registry.cn-hangzhou.aliyuncs.com/labnow/valkey - - registry.cn-beijing.aliyuncs.com/labnow/valkey + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/valkey + - registry.cn-beijing.aliyuncs.com/labnow-ai/valkey # k3s @@ -39,32 +39,32 @@ docker.io/valkey/valkey:latest,8,8.1,8.1.0: # - ref2: https://docs.k3s.io/installation/airgap rancher/k3s:latest,v1.32.3-k3s1: - quay.io/labnow/k3s - - registry.cn-hangzhou.aliyuncs.com/labnow/k3s - - registry.cn-beijing.aliyuncs.com/labnow/k3s + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/k3s + - registry.cn-beijing.aliyuncs.com/labnow-ai/k3s # k3d: https://github.com/k3d-io/k3d/pkgs/container/k3d ghcr.io/k3d-io/k3d:latest,5-dind,5: - quay.io/labnow/k3s - - registry.cn-hangzhou.aliyuncs.com/labnow/k3d - - registry.cn-beijing.aliyuncs.com/labnow/k3d + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/k3d + - registry.cn-beijing.aliyuncs.com/labnow-ai/k3d # k3d-proxy:https://github.com/k3d-io/k3d/pkgs/container/k3d-proxy ghcr.io/k3d-io/k3d-proxy:latest,5: - quay.io/labnow/k3s - - registry.cn-hangzhou.aliyuncs.com/labnow/k3d-proxy - - registry.cn-beijing.aliyuncs.com/labnow/k3d-proxy + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/k3d-proxy + - registry.cn-beijing.aliyuncs.com/labnow-ai/k3d-proxy # k3d-tools: https://github.com/k3d-io/k3d/pkgs/container/k3d-tools ghcr.io/k3d-io/k3d-tools:latest,5: - quay.io/labnow/k3s - - registry.cn-hangzhou.aliyuncs.com/labnow/k3d-tools - - registry.cn-beijing.aliyuncs.com/labnow/k3d-tools + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/k3d-tools + - registry.cn-beijing.aliyuncs.com/labnow-ai/k3d-tools # kube-scheduler registry.k8s.io/kube-scheduler:/v\d+\.\d+\.\d+/: - quay.io/labnow/kube-scheduler - - registry.cn-hangzhou.aliyuncs.com/labnow/kube-scheduler - - registry.cn-beijing.aliyuncs.com/labnow/kube-scheduler + - registry.cn-hangzhou.aliyuncs.com/labnow-ai/kube-scheduler + - registry.cn-beijing.aliyuncs.com/labnow-ai/kube-scheduler From 06e868cbf24ebd9dc51ebc6fc85f60ebfbfe0798 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Fri, 13 Mar 2026 05:29:01 +0000 Subject: [PATCH 5/5] update docs --- .github/workflows/task-sync.yml | 2 +- README-zh_CN.md | 22 ++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 README-zh_CN.md diff --git a/.github/workflows/task-sync.yml b/.github/workflows/task-sync.yml index fdd8b9f..1ff0a00 100644 --- a/.github/workflows/task-sync.yml +++ b/.github/workflows/task-sync.yml @@ -14,7 +14,7 @@ concurrency: cancel-in-progress: true jobs: - ## Sync all images in this build (listed by "names") to mirror registry. + ## Sync all images defined in `task-sync-docker-images/images.yaml` sync_images: # needs: [] runs-on: ubuntu-latest diff --git a/README-zh_CN.md b/README-zh_CN.md new file mode 100644 index 0000000..d7bfc47 --- /dev/null +++ b/README-zh_CN.md @@ -0,0 +1,22 @@ +# Task Sync Docker Images(中文版) + +本仓库提供一个自动化的 GitHub Actions 工作流,用于将源镜像仓库的镜像同步到镜像仓库(mirror)。适合需要稳定、可审计、可重复的镜像同步流程的团队使用。 + +## 项目用途 + +- 使用 `task-sync-docker-images/images.yaml` 定义需要同步的镜像及目标仓库。 +- 通过 GitHub Actions 工作流,使用 `labnow/docker-kit` 容器中的 `image-syncer` 执行同步。 +- 按配置将镜像推送到目标仓库。 + +## 使用方式(Fork + 自定义) + +1. 将本仓库 Fork 到你自己的 GitHub 账号或组织。 +2. 修改 `task-sync-docker-images/images.yaml`,添加或更新需要同步的镜像和目标仓库。 +3. 在仓库 Secrets 中创建 `AUTH_FILE_CONTENT`,内容为 JSON 格式的认证信息(示例见 `task-sync-docker-images/README.md`)。 +4. 触发工作流: + - 在 Actions 中手动运行 `sync-docker-images`; + - 或者向 `main` 分支提交代码(工作流会忽略 `*.md` 变更)。 + +## 本地手动运行 + +如需在本地或 GitHub Codespaces 中运行,请参考 `task-sync-docker-images/README.md` 中的本地运行说明。 diff --git a/README.md b/README.md index b76fc40..875293d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This repository provides an automated GitHub Actions workflow to sync container images from source registries to mirror registries. It is designed for teams that need repeatable, auditable image mirroring using a simple YAML configuration. +中文介绍: `README-zh_CN.md` + ## What This Project Does - Defines image mappings in `task-sync-docker-images/images.yaml`.