Skip to content

Commit

Permalink
Explicit specify the platform for Docker files (#905)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
normanmaurer authored Nov 8, 2024
1 parent 0e96400 commit 329c7b6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.arch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM archlinux/base
FROM --platform=linux/amd64 archlinux/base

ARG java_version=8
ENV JAVA_VERSION $java_version
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.centos6
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.cross_compile_aarch64
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.opensuse
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 329c7b6

Please sign in to comment.