Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sync-image

Scripts for syncing container images from public registries to offline local registry

Usage

  1. Create a list.json that 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.).

  1. 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.json

By 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-path

The resulting target image is:

10.102.32.251:1121/calico/node:v3.31.4

About

Scripts for syncing container images from public registries to offline local registry

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages