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 images.yaml.
There are two main functions this script provides:
- tidy: The
tidycommand will consume theimages.yamlfile specified with the-fflag and locate images that are either unused or missing from it. - sync: The
synccommand syncs the images in theimageskey ofimages.yamlto the registry specified bydestination.registry(or the--registryflag, if passed)
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 buildTo build the an image that is runnable on an ARM64 machine, execute the following command:
ARCH=arm64 make buildor for amd64
ARCH=amd64 make buildThe following sections describe how imagesync can be run using one of two methods:
- Using the image built by the
Buildsection of this README - Using the script directly
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}\.dockerand on your WSL distro:
/home/{USER}/.dockerIf 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/:/home/python/.docker/ \
-v ${HOME}/.kube/config:/home/python/.kube/config \
-v ${PWD}/images.yaml:/app/images.yaml \
--rm imagesync:latest \
-f /app/images.yaml \
--help