Skip to content

Imagesync is a tool that functions as a wrapper for Google's Crane tool to create, manage, and transfer a list of images from various sources to a single destination registry

License

Notifications You must be signed in to change notification settings

chaospuppy/imagesync

Repository files navigation

Imagesync

The script in this directory, imagesync.py is used to both manage and transfer images from external registries (such as registry1, docker, quay, etc.) to the registry specified in the destination.registry key of ecr.yaml.

There are two main functions this script provides:

  • tidy: The tidy command will consume the ecr.yaml file specified with the -f flag and locate images that are either unused or missing from it.
  • sync: The sync command syncs the images in the images key of ecr.yaml to the registry specified by destination.registry (or the --registry flag, if passed)

Build

The Dockerfile in this directory will create an image that has imagesync.py and all its dependencies available.

To build the an image that is runnable on the architecture of your machine, execute the following command:

make build

To build the an image that is runnable on an ARM64 machine, execute the following command:

ARCH=arm64 make build

or for amd64

ARCH=amd64 make build

Usage

The following sections describe how imagesync can be run using one of two methods:

  • Using the image built by the Build section of this README
  • Using the script directly

WSL

If you are running WSL it is recommended that you download and setupdocker desktop wsl2 backend and setup your folder structure on windows as:

C:\Users\{USER}\.docker

and on your WSL distro:

/home/{USER}/.docker

Image

If you wish to use the image built by commands in the Build section of this README, you can run the following command:

docker run \
-v ${HOME}/.docker/:/root/.docker/ \
-v ${HOME}/.kube/config:/root/.kube/config \
-v ${PWD}/images.yaml:/app/images.yaml \
--rm imagesync:latest \
-f /app/images.yaml \
--help

About

Imagesync is a tool that functions as a wrapper for Google's Crane tool to create, manage, and transfer a list of images from various sources to a single destination registry

Resources

License

Stars

Watchers

Forks

Packages

No packages published