Skip to content

Commit 8082508

Browse files
committed
Add arm64 support in Dockerfile.
Signed-off-by: odidev <odidev@puresoftware.com>
1 parent 75c9e61 commit 8082508

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

dockerfiles/official/stable/Dockerfile

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,27 @@ RUN apt-get update \
55
&& apt-get install -y --no-install-recommends wget ca-certificates gnupg2 \
66
&& rm -rf /var/lib/apt/lists/*
77

8-
RUN export GNUPGHOME="$(mktemp -d)" \
9-
&& wget -q -O - https://dist.sapmachine.io/debian/sapmachine.old.key | gpg --batch --import \
10-
&& gpg --batch --export --armor 'DA4C 00C1 BDB1 3763 8608 4E20 C7EB 4578 740A EEA2' > /etc/apt/trusted.gpg.d/sapmachine.old.gpg.asc \
11-
&& wget -q -O - https://dist.sapmachine.io/debian/sapmachine.key | gpg --batch --import \
12-
&& gpg --batch --export --armor 'CACB 9FE0 9150 307D 1D22 D829 6275 4C3B 3ABC FE23' > /etc/apt/trusted.gpg.d/sapmachine.gpg.asc \
13-
&& gpgconf --kill all && rm -rf "$GNUPGHOME" \
14-
&& echo "deb http://dist.sapmachine.io/debian/amd64/ ./" > /etc/apt/sources.list.d/sapmachine.list \
15-
&& apt-get update \
16-
&& apt-get -y --no-install-recommends install sapmachine-15-jdk=15.0.1 \
17-
&& rm -rf /var/lib/apt/lists/*
8+
RUN if [ `uname -m` = "aarch64" ] ; then \
9+
wget -q https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1-beta_linux-aarch64_bin.tar.gz && \
10+
tar -xf /sapmachine-jdk-15.0.1-beta_linux-aarch64_bin.tar.gz && \
11+
mkdir /usr/lib/jvm && \
12+
cp -R sapmachine-jdk-15.0.1 /usr/lib/jvm/sapmachine-15 && \
13+
rm /sapmachine-jdk-15.0.1-beta_linux-aarch64_bin.tar.gz; \
14+
else \
15+
export GNUPGHOME="$(mktemp -d)" && \
16+
wget -q -O - https://dist.sapmachine.io/debian/sapmachine.old.key | gpg --batch --import && \
17+
gpg --batch --export --armor 'DA4C 00C1 BDB1 3763 8608 4E20 C7EB 4578 740A EEA2' > /etc/apt/trusted.gpg.d/sapmachine.old.gpg.asc && \
18+
wget -q -O - https://dist.sapmachine.io/debian/sapmachine.key | gpg --batch --import && \
19+
gpg --batch --export --armor 'CACB 9FE0 9150 307D 1D22 D829 6275 4C3B 3ABC FE23' > /etc/apt/trusted.gpg.d/sapmachine.gpg.asc && \
20+
gpgconf --kill all && rm -rf "$GNUPGHOME" && \
21+
echo "deb http://dist.sapmachine.io/debian/amd64/ ./" > /etc/apt/sources.list.d/sapmachine.list && \
22+
apt-get update && \
23+
apt-get -y --no-install-recommends install sapmachine-15-jdk=15.0.1 && \
24+
rm -rf /var/lib/apt/lists/*; \
25+
fi
1826

1927
ENV JAVA_HOME=/usr/lib/jvm/sapmachine-15
28+
ENV PATH=$PATH:$JAVA_HOME/bin
2029

2130
CMD ["jshell"]
31+

0 commit comments

Comments
 (0)