chaospuppy / imagesync

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
GNU General Public License v3.0
3 stars 1 forks source link

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:

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:

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