From 7ccc688a4be109b0adbe488e4d71a71579525f6d Mon Sep 17 00:00:00 2001 From: Derek Trider Date: Thu, 15 Sep 2022 16:43:30 -0400 Subject: [PATCH] fix: Docker warning when using frapsoft/openssl on arm64 system Resolved a warning from Docker that would get printed when running the generate-test-keys Makefile target on an arm64 system. The warning from Docker alerts you that the image for frapsoft/openssl is for amd64, which doesn't match the system you're on (when using an arm64-based OS). To resolve the warning, you have to either use an image that matches the system architecture, or explicitly state the platform using the --platform flag. In this case, there is only an amd64 version of frapsoft/openssl, so I added the explicit flag to resolve the warning. I also added a TODO for us to find an arm64 alternative in the future (although the amd64 version of frapsoft/openssl does work fine on arm64 macOS currently as it seems that Docker makes use of QEMU to support emulation of non-native architectures). Signed-off-by: Derek Trider --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 558e341fc..b36c5fe3b 100644 --- a/Makefile +++ b/Makefile @@ -88,9 +88,12 @@ vc-test-suite: clean bbs-interop-test: @scripts/check_bbs_interop.sh +# TODO (#3373): frapsoft/openssl only has an amd64 version. While this does work when using Docker on arm64-based macOS +# currently thanks to the automatic built-in QEMU emulation, it would be better to use a +# native arm64 version. generate-test-keys: clean @mkdir -p -p test/bdd/fixtures/keys/tls - @docker run -i --rm \ + @docker run -i --platform linux/amd64 --rm \ -v $(abspath .):/opt/go/src/$(PROJECT_ROOT) \ --entrypoint "/opt/go/src/$(PROJECT_ROOT)/scripts/generate_test_keys.sh" \ frapsoft/openssl