Skip to content

Instantly share code, notes, and snippets.

@mingfang
Last active January 23, 2024 15:19
Show Gist options
  • Save mingfang/8300d1401a2909fa63968783734f9bdc to your computer and use it in GitHub Desktop.
Save mingfang/8300d1401a2909fa63968783734f9bdc to your computer and use it in GitHub Desktop.
Use skopeo to sync all images across private Docker registries
export SRC="10.0.4.5:5000"
export DEST="10.0.4.5:6000"
curl -s http://${SRC}/v2/_catalog | jq .repositories[] | xargs -I {} \
skopeo sync \
--src-tls-verify=false --src docker --src-creds ${DOCKER_USER}:${DOCKER_PASS} \
--dest-tls-verify=false --dest docker --dest-creds ${DOCKER_USER}:${DOCKER_PASS} \
${SRC}/{} ${DEST}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment