Skip to content

Commit

Permalink
[release] Force to use linux/amd64 to build release (apache#4060)
Browse files Browse the repository at this point in the history
---

### Motivation

Because we have a Native IO that needs to be built from
cpp code. The build platform will impact the target library.
People are using different laptop to execute the release
process with docker, we need to force the image to use
linux/amd64 platform to ensure the .so lib build out the
correct platform lib.
Since most of time we are using amd64 to run the bookie,
making the dev docker image build from amd64.
  • Loading branch information
zymap authored and Anup Ghatage committed Jul 12, 2024
1 parent 48d1b4d commit 1a4c3bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/release/000-run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ else # boot2docker uid and gid
fi

docker build -t "${IMAGE_NAME}-${USER_NAME}" - <<UserSpecificDocker
FROM ${IMAGE_NAME}
FROM --platform=linux/amd64 ${IMAGE_NAME}
RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME} && \
useradd -l -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME}
ENV HOME /home/${USER_NAME}
Expand Down
2 changes: 1 addition & 1 deletion dev/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

FROM maven:3.9.0-eclipse-temurin-8
FROM --platform=linux/amd64 maven:3.9.0-eclipse-temurin-8

RUN apt-get update
RUN apt-get install -y g++ cmake gnupg2 vim subversion

0 comments on commit 1a4c3bf

Please sign in to comment.