Skip to content

Commit da07048

Browse files
nickboldtrm3lgazarenkov
authored
fix: force skopeo to pull the amd64 images... (#4331)
* fix: force skopeo to pull the amd64 images even on arm64 (RHDHBUGS-2747); note that these images are TECHNICALLY arch-agnostic scratch images but it seems when published via Konflux, they have a default arch set to amd64 Signed-off-by: Nick Boldt <nboldt@redhat.com> * fix: override OS as well Co-authored-by: Gennady Azarenkov <gazarenkov@gmail.com> --------- Signed-off-by: Nick Boldt <nboldt@redhat.com> Co-authored-by: Armel Soro <asoro@redhat.com> Co-authored-by: Gennady Azarenkov <gazarenkov@gmail.com>
1 parent b0911bc commit da07048

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/install-dynamic-plugins/install-dynamic-plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def get_plugin_tar(self, image: str) -> str:
671671
local_dir = os.path.join(self.tmp_dir, image_digest)
672672
# replace oci:// prefix with docker://
673673
image_url = resolved_image.replace(OCI_PROTOCOL_PREFIX, DOCKER_PROTOCOL_PREFIX)
674-
self.skopeo(['copy', image_url, f'dir:{local_dir}'])
674+
self.skopeo(['copy', '--override-os=linux', '--override-arch=amd64', image_url, f'dir:{local_dir}'])
675675
manifest_path = os.path.join(local_dir, 'manifest.json')
676676
manifest = json.load(open(manifest_path))
677677
# get the first layer of the image
@@ -1091,7 +1091,7 @@ def extract_catalog_index(catalog_index_image: str, catalog_index_mount: str, ca
10911091

10921092
# Download the OCI image using skopeo
10931093
run_command(
1094-
[skopeo_path, 'copy', image_url, f'dir:{local_dir}'],
1094+
[skopeo_path, 'copy', '--override-os=linux', '--override-arch=amd64', image_url, f'dir:{local_dir}'],
10951095
f"Failed to download catalog index image {resolved_image}"
10961096
)
10971097

0 commit comments

Comments
 (0)