Skip to content

Commit 4530cfb

Browse files
DeviaVirjgriffiths
authored andcommitted
docker: add arm64 support, update bullseye image to the latest
1 parent 67b20a5 commit 4530cfb

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

contrib/Dockerfile_bullseye

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
# build from this directory with e.g:
44
# DOCKER_BUILDKIT=1 docker build . -t greenaddress/wallycore -f Dockerfile_bullseye
55
#
6-
FROM debian:bullseye@sha256:71cb300d5448af821aedfe63afd55ba05f45a6a79f00dcd131b96b780bb99fe4
6+
FROM debian:bullseye@sha256:01559430c84e6bc864bed554345d1bfbfa94ac108ab68f39915cae34604b15c3
77
WORKDIR /root
88
COPY bullseye_deps.sh ./deps.sh
99
COPY requirements.txt ./contrib/requirements.txt
10+
ARG TARGETARCH=amd64
11+
ENV TARGETARCH=${TARGETARCH}
12+
ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-${TARGETARCH}
1013
RUN ./deps.sh && rm ./deps.sh
11-
ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
1214
ENV ANDROID_NDK=/opt/android-ndk-r26b

contrib/bullseye_deps.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ 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 $(basename ${JAVA_HOME})
4141
fi
4242

4343
pip3 install valgrind-codequality -r contrib/requirements.txt
@@ -58,8 +58,14 @@ if [ -z "$skip_emsdk" ]; then
5858
# Install emsdk
5959
git clone https://github.com/emscripten-core/emsdk
6060
cd emsdk
61-
./emsdk install 3.1.52
62-
./emsdk activate 3.1.52
61+
EMSDK_VERSION=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_VERSION=3.1.33
66+
fi
67+
./emsdk install ${EMSDK_VERSION}
68+
./emsdk activate ${EMSDK_VERSION}
6369
# Force emsdk to use the installed node version instead of its own
6470
sed -i "s/^NODE_JS = .*$/NODE_JS = 'node'/g" /opt/emsdk/.emscripten
6571
# Make emsdk commands available

0 commit comments

Comments
 (0)