Skip to content

Commit 09cbbc2

Browse files
committed
udpate docker run to force platform to linux/amd64
1 parent 0c00340 commit 09cbbc2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

python/rpdk/python/codegen.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ def _docker_build(cls, external_path):
375375
stream=True,
376376
entrypoint="",
377377
user=localuser,
378+
platform="linux/amd64",
378379
)
379380
except RequestsConnectionError as e:
380381
# it seems quite hard to reliably extract the cause from

tests/plugin/codegen_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ def test__build_docker_posix(plugin):
626626
stream=True,
627627
entrypoint="",
628628
user=ANY,
629+
platform="linux/amd64",
629630
)
630631

631632

@@ -652,6 +653,7 @@ def test__build_docker_windows(plugin):
652653
stream=True,
653654
entrypoint="",
654655
user="root:root",
656+
platform="linux/amd64",
655657
)
656658

657659

@@ -681,6 +683,7 @@ def test__build_docker_no_euid(plugin):
681683
stream=True,
682684
entrypoint="",
683685
user="root:root",
686+
platform="linux/amd64",
684687
)
685688

686689

@@ -701,6 +704,7 @@ def test__docker_build_good_path(plugin, tmp_path):
701704
stream=True,
702705
entrypoint="",
703706
user=ANY,
707+
platform="linux/amd64",
704708
)
705709

706710

@@ -743,4 +747,5 @@ def test__docker_build_bad_path(plugin, tmp_path, exception):
743747
stream=True,
744748
entrypoint="",
745749
user=ANY,
750+
platform="linux/amd64",
746751
)

0 commit comments

Comments
 (0)