Skip to content

Commit

Permalink
Use --platform to select container arch at runtime
Browse files Browse the repository at this point in the history
The bugs seem to have been worked out here, so we can use multi-platform
container images like the ones we've generated for CI and still select
the runtime architecture we want if we need to build packages via QEMU.
  • Loading branch information
kocolosk committed Feb 10, 2022
1 parent 54151f7 commit 7f1e10a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -91,6 +91,7 @@ debian-bullseye: SPIDERMONKEY_DEV=libmozjs-78-dev
debian-bullseye: SM_VER=78
debian-bullseye: bullseye

arm64-debian-bullseye: aarch64-debian-bullseye
arm64v8-debian-bullseye: aarch64-debian-bullseye
aarch64-debian-bullseye: PLATFORM=bullseye
aarch64-debian-bullseye: DIST=debian-bullseye
Expand Down
4 changes: 3 additions & 1 deletion build.sh
Expand Up @@ -32,7 +32,7 @@ DEBIANS="debian-stretch debian-buster debian-bullseye"
UBUNTUS="ubuntu-bionic ubuntu-focal"
CENTOSES="centos-7 centos-8"
XPLAT_BASE="debian-bullseye"
XPLAT_ARCHES="arm64v8 ppc64le"
XPLAT_ARCHES="arm64 ppc64le"
BINARY_API="https://apache.jfrog.io/artifactory"
ERLANGVERSION=${ERLANGVERSION:-23.3.4.10}

Expand Down Expand Up @@ -88,12 +88,14 @@ build-couch() {
docker run \
--mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
-u 0 -w /home/jenkins/couchdb-pkg \
--platform linux/amd64 \
apache/couchdbci-${os}:${version}-erlang-${ERLANGVERSION} \
make copy-couch $1 COUCHTARBALL=${COUCHTARBALL}
else
docker run \
--mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
-u 0 -w /home/jenkins/couchdb-pkg \
--platform linux/${CONTAINERARCH} \
apache/couchdbci-${os}:${version}-erlang-${ERLANGVERSION} \
make copy-couch ${CONTAINERARCH}-$1 COUCHTARBALL=${COUCHTARBALL}
fi
Expand Down

0 comments on commit 7f1e10a

Please sign in to comment.