From 036099c73890de945176ae600932dbd42923292a Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 8 Nov 2024 16:26:29 +0100 Subject: [PATCH] Explicit specify the platform for Docker files Motivation: We should explicit specify the platform we use for docker to ensure our build produce the correct artifacts Modifications: Add --platform=linux/amd64 to docker files Result: Ensure build produces correct artifacts --- docker/Dockerfile.arch | 2 +- docker/Dockerfile.centos6 | 2 +- docker/Dockerfile.cross_compile_aarch64 | 2 +- docker/Dockerfile.debian | 2 +- docker/Dockerfile.opensuse | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.arch b/docker/Dockerfile.arch index 70c534461..a4a574fc0 100644 --- a/docker/Dockerfile.arch +++ b/docker/Dockerfile.arch @@ -1,4 +1,4 @@ -FROM archlinux/base +FROM --platform=linux/amd64 archlinux/base ARG java_version=8 ENV JAVA_VERSION $java_version diff --git a/docker/Dockerfile.centos6 b/docker/Dockerfile.centos6 index 96f955052..4d4041b8a 100644 --- a/docker/Dockerfile.centos6 +++ b/docker/Dockerfile.centos6 @@ -1,4 +1,4 @@ -FROM centos:6.10 +FROM --platform=linux/amd64 centos:6.10 ENV SOURCE_DIR /root/source ENV CMAKE_VERSION_BASE 3.26 diff --git a/docker/Dockerfile.cross_compile_aarch64 b/docker/Dockerfile.cross_compile_aarch64 index 5f2d4361e..79dce095c 100644 --- a/docker/Dockerfile.cross_compile_aarch64 +++ b/docker/Dockerfile.cross_compile_aarch64 @@ -1,4 +1,4 @@ -FROM centos:7.6.1810 +FROM --platform=linux/amd64 centos:7.6.1810 ARG gcc_version=10.2-2020.11 ARG openssl_version=1_1_1d diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index 73b7e7cfa..7c04a4508 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -1,5 +1,5 @@ ARG debian_version=7 -FROM debian:$debian_version +FROM --platform=linux/amd64 debian:$debian_version # needed to do again after FROM due to docker limitation ARG debian_version diff --git a/docker/Dockerfile.opensuse b/docker/Dockerfile.opensuse index 9df72437e..e0e6e2033 100644 --- a/docker/Dockerfile.opensuse +++ b/docker/Dockerfile.opensuse @@ -1,5 +1,5 @@ ARG opensuse_version=15.1 -FROM opensuse/leap:$opensuse_version +FROM --platform=linux/amd64 opensuse/leap:$opensuse_version # needed to do again after FROM due to docker limitation ARG opensuse_version