Skip to content

An image sync tool based on skopeo and declarative configuration file, ensure that all images are synchronized to the declared address, only sync newly pushed image tags if image have synced before.

Notifications You must be signed in to change notification settings

imroc/image-porter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-porter

An image sync tool based on declarative configuration file, which can specify the source and destination of the images, and filter the tag list that needs to be synchronized, only sync newly pushed image tags if image have synced before.

You can use crontab / cronjob to sync images periodicly, so that keep image tags update to date.

Installation

go install github.com/imroc/image-porter@latest

Usage

Use image-porter to sync images between different registries:

image-porter config.yaml

A config file is required, for example:

default:
  tagFilter:
    regex: ^v?\d+(\.\d+){0,2}$
images:
  - from: registry.k8s.io/ingress-nginx/kube-webhook-certgen
    to: docker.io/k8smirror/ingress-nginx-kube-webhook-certgen
    tagFilter:
      regex: ^v.*$
  - from: registry.k8s.io/ingress-nginx/opentelemetry
    to: docker.io/k8smirror/ingress-nginx-opentelemetry
    tagFilter:
      regex: ^v\w+-\w+$
  - from: registry.k8s.io/defaultbackend-amd64
    to: docker.io/k8smirror/defaultbackend-amd64
    tagFilter:
      regex: ^.*$
  - from: registry.k8s.io/ingress-nginx/controller
    to: docker.io/k8smirror/ingress-nginx-controller

Example: Sync Images with Kubernetes CronJob

Checkout this directory for how to sync images with Kubernetes CronJob (Use kustomize to manage manifests).

About

An image sync tool based on skopeo and declarative configuration file, ensure that all images are synchronized to the declared address, only sync newly pushed image tags if image have synced before.

Resources

Stars

Watchers

Forks

Packages

No packages published