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
command will consume the ecr.yaml
file specified with the -f
flag and locate images that are either unused or missing from it.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)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
The following sections describe how imagesync can be run using one of two methods:
Build
section of this READMEIf 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
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