Skip to content

Commit 6c69374

Browse files
authored
Arm64 support (#291)
1 parent 904ad92 commit 6c69374

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM debian
22

3-
# ARCH is only set to avoid repetition in Dockerfile since the binary download only supports amd64
3+
# ARCH is only set to avoid repetition in Dockerfile, use --build-arg ARCH=arm64 for arm cpu
44
ARG ARCH=amd64
55

66
ARG APT_UPDATE=20210112
@@ -13,6 +13,18 @@ RUN apt-get update && \
1313
&& apt-get clean \
1414
&& rm -rf /var/lib/apt/lists/*
1515

16+
# Instal box64 on arm
17+
RUN if [ "$ARCH" = "arm64" ] ; then \
18+
apt-get update && \
19+
DEBIAN_FRONTEND=noninteractive apt-get install -y debian-keyring && \
20+
curl -L https://ryanfortner.github.io/box64-debs/box64.list -o /etc/apt/sources.list.d/box64.list && \
21+
curl -L https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor > /usr/share/keyrings/box64-debs-archive-keyring.gpg && \
22+
apt-get update && \
23+
DEBIAN_FRONTEND=noninteractive apt-get install -y box64 \
24+
&& apt-get clean \
25+
&& rm -rf /var/lib/apt/lists/* ;\
26+
fi
27+
1628
EXPOSE 19132/udp
1729

1830
VOLUME ["/data"]

bedrock-entry.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,8 @@ set-property --file server.properties --bulk /etc/bds-property-definitions.json
159159
export LD_LIBRARY_PATH=.
160160

161161
echo "Starting Bedrock server..."
162-
exec ./bedrock_server-${VERSION}
162+
if [ -f /usr/local/bin/box64 ] ; then
163+
exec box64 ./bedrock_server-${VERSION}
164+
else
165+
exec ./bedrock_server-${VERSION}
166+
fi

0 commit comments

Comments
 (0)