Skip to content

Commit 6f1ed04

Browse files
committed
docker: add arm64 support
1 parent 230f62c commit 6f1ed04

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

contrib/Dockerfile_bullseye

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ FROM debian:bullseye@sha256:71cb300d5448af821aedfe63afd55ba05f45a6a79f00dcd131b9
77
WORKDIR /root
88
COPY bullseye_deps.sh ./deps.sh
99
COPY requirements.txt ./contrib/requirements.txt
10+
ARG TARGETARCH
11+
ENV TARGETARCH=${TARGETARCH}
1012
RUN ./deps.sh && rm ./deps.sh
11-
ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
1213
ENV ANDROID_NDK=/opt/android-ndk-r26b

contrib/bullseye_deps.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ fi
3737
apt install --no-install-recommends unzip autoconf automake autotools-dev pkg-config build-essential libtool python3{,-dev,-pip,-virtualenv} python{,-dev}-is-python3 clang{,-format,-tidy} git swig curl cmake libssl-dev libtool-bin $java_packages curl $windows_packages valgrind jq -yqq
3838

3939
if [ -z "$skip_java" ]; then
40-
update-java-alternatives -s java-1.11.0-openjdk-amd64
40+
update-java-alternatives -s java-1.11.0-openjdk-${TARGETARCH}
41+
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-${TARGETARCH}
4142
fi
4243

4344
pip3 install valgrind-codequality -r contrib/requirements.txt
@@ -58,8 +59,15 @@ if [ -z "$skip_emsdk" ]; then
5859
# Install emsdk
5960
git clone https://github.com/emscripten-core/emsdk
6061
cd emsdk
61-
./emsdk install 3.1.52
62-
./emsdk activate 3.1.52
62+
if [ "${TARGETARCH}" = "arm64" ]; then
63+
# very few versions of emsdk are available for linux-arm64
64+
# https://github.com/emscripten-core/emsdk/issues/547
65+
./emsdk install 3.1.33
66+
./emsdk activate 3.1.33
67+
else
68+
./emsdk install 3.1.52
69+
./emsdk activate 3.1.52
70+
fi
6371
# Force emsdk to use the installed node version instead of its own
6472
sed -i "s/^NODE_JS = .*$/NODE_JS = 'node'/g" /opt/emsdk/.emscripten
6573
# Make emsdk commands available

0 commit comments

Comments
 (0)