Scripts for syncing container images from public registries to offline local registry
- Create a
list.jsonthat contains an JSON array (of string) including source images to sync.
The images MUST containing the host name and port of source registry (like docker.io, quay.io etc.).
- Execute the sync script:
# Required flag -r <target_local_regisry>
python3 sync.py -r <local_repo_host_name>:[local_repo_port]/<local_repo_sub_paths>/<without_ending_slash>
# Optional flag
# -l list.jsonBy default, the source image path after the registry is preserved. For example:
quay.io/calico/node:v3.31.4
-> 10.102.32.251:1121/calico/calico/node:v3.31.4
Use --no-preserve-source-path (or --flatten-source-path) to keep only the
final image name and tag:
python3 sync.py \
-r 10.102.32.251:1121/calico \
-l list.json \
--no-preserve-source-pathThe resulting target image is:
10.102.32.251:1121/calico/node:v3.31.4