Skip to main content

SyncerD

SyncerD

SyncerD is a lightweight Go tool that copies Docker images from Docker Hub into your private registries — AWS ECR, Azure ACR, Google GCR, and GitHub Container Registry — automatically and without manual intervention.

Repository: clouddrove/SyncerD

Why it exists: Docker Hub's rate limits (100–200 pulls per 6 hours for free accounts) can break CI pipelines and Kubernetes node pulls. SyncerD mirrors the images you care about into registries you control, so your infrastructure never hits Docker Hub directly.


Features​

  • Multi-registry support — sync to ECR, ACR, GCR, and GHCR simultaneously from one config file
  • Automatic tag detection — monitors source tags and syncs only new images
  • Three deployment modes — CLI, GitHub Action, or Kubernetes CronJob
  • Stateless by default — no database required; optionally tracks state to a file
  • Slack notifications — alerts for sync completions and failures
  • Secure auth — Docker Hub via env vars; destinations use the standard Docker credential chain

Installation​

MethodCommand
Go installgo install github.com/clouddrove/syncerd@latest
Build from sourcegit clone https://github.com/clouddrove/SyncerD.git && cd SyncerD && go build -o syncerd ./main.go
Dockerdocker run ghcr.io/clouddrove/syncerd:latest syncerd sync --once
GitHub ReleasesDownload from the releases page

Quick start​

1. Write a config file​

# syncerd.yaml
source:
type: dockerhub
registry: docker.io

destinations:
- name: my-ecr
type: ecr
registry: 123456789012.dkr.ecr.us-east-1.amazonaws.com
region: us-east-1

images:
- name: library/nginx
watch_tags: true
- name: library/redis
watch_tags: true

2. Set credentials​

export SYNCERD_SOURCE_USERNAME=your-dockerhub-username
export SYNCERD_SOURCE_PASSWORD=your-dockerhub-token

For destinations, authenticate with the standard Docker CLI:

# ECR
aws ecr get-login-password --region us-east-1 | \
docker login --username AWS --password-stdin 123456789012.dkr.ecr.us-east-1.amazonaws.com

# GHCR
echo $GITHUB_TOKEN | docker login ghcr.io --username $GITHUB_USER --password-stdin

3. Run​

# One-time sync
./syncerd sync --once

# Continuous mode (uses `schedule` from config)
./syncerd sync

Deployment modes​

GitHub Actions​

- uses: clouddrove/SyncerD@v1
with:
config: syncerd.yaml
once: "true"
env:
SYNCERD_SOURCE_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
SYNCERD_SOURCE_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Kubernetes CronJob (Helm)​

helm install syncerd ./_helm/syncerd \
--namespace syncerd \
--create-namespace

Configuration reference​

Top-level fields​

FieldDescription
sourceDocker Hub connection (type, registry)
destinationsList of target registries
imagesImages to sync with optional tag filters
scheduleCron expression for continuous mode (e.g., 0 */6 * * *)
state_pathFile path to track already-synced tags
slack.webhook_urlSlack webhook for notifications
fail_fastStop on first error (true) or continue (false)

Environment variable overrides​

All config values can be overridden with the SYNCERD_ prefix:

VariableDescription
SYNCERD_SOURCE_USERNAMEDocker Hub username
SYNCERD_SOURCE_PASSWORDDocker Hub password or PAT
SYNCERD_SOURCE_TOKENDocker Hub personal access token
SYNCERD_STATE_PATHPath to state file
SYNCERD_SLACK_WEBHOOK_URLSlack webhook URL
SYNCERD_SLACK_CHANNELSlack channel
SYNCERD_FAIL_FASTtrue or false

Multi-destination example​

Sync the same image to ECR, ACR, and GHCR simultaneously:

source:
type: dockerhub
registry: docker.io

destinations:
- name: aws-ecr
type: ecr
registry: 123456789012.dkr.ecr.us-east-1.amazonaws.com
region: us-east-1

- name: azure-acr
type: acr
registry: mycompany.azurecr.io

- name: github-ghcr
type: ghcr
registry: ghcr.io/myorg

images:
- name: library/nginx
watch_tags: true
- name: library/postgres
tags: ["15", "15-alpine"]

schedule: "0 */6 * * *"

slack:
webhook_url: https://hooks.slack.com/services/xxx/yyy/zzz

fail_fast: false