Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions scripts/mirror-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,8 @@ function mirror_registry() {
skopeo_retry copy ${skopeo_opts} --quiet \
--preserve-digests \
--authfile "${img_pull_file}" \
--additional-tag "${dst_img_no_tag}:latest" \
docker://"${src_img}" docker://"${dst_img}"

echo "Tagging '${dst_img_no_tag}' as 'latest'"
# shellcheck disable=SC2086
skopeo_retry copy ${skopeo_opts} --quiet \
--preserve-digests \
--authfile "${img_pull_file}" \
docker://"${dst_img}" docker://"${dst_img_no_tag}:latest"
}

# Export functions for xargs to use
Expand Down Expand Up @@ -153,14 +147,8 @@ function dir_to_registry() {
skopeo_retry copy ${skopeo_opts} --quiet \
--preserve-digests \
--authfile "${img_pull_file}" \
--additional-tag "${dst_img_no_tag}:latest" \
dir://"${local_dir}/${src_img}" docker://"${dst_img}"

echo "Tagging '${dst_img}' as '${dst_img_no_tag}:latest'"
# shellcheck disable=SC2086
skopeo_retry copy ${skopeo_opts} --quiet \
--preserve-digests \
--authfile "${img_pull_file}" \
docker://"${dst_img}" docker://"${dst_img_no_tag}:latest"
}

# Export functions for xargs to use
Expand Down
4 changes: 2 additions & 2 deletions test/bin/mirror_registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ finalize_registry() {
# Ensure that permissions are open for the current user on the mirror registry
# directories and files. This is necessary to avoid 'find' command errors.
sudo chgrp -R "$(id -gn)" "${MIRROR_REGISTRY_DIR}"
sudo find "${MIRROR_REGISTRY_DIR}" -type d -exec sudo chmod a+rx '{}' \;
sudo find "${MIRROR_REGISTRY_DIR}" -type f -exec sudo chmod a+r '{}' \;
sudo find "${MIRROR_REGISTRY_DIR}" -type d -exec chmod a+rx '{}' +
sudo find "${MIRROR_REGISTRY_DIR}" -type f -exec chmod a+r '{}' +
}

mirror_images() {
Expand Down