ARG SAPMACHINE_VERSION=11.0.17
+ENV JAVA_HOME /opt/jdk
+
RUN sapmachine_install() { \
+ SAPMACHINE_MAJOR_VERSION=$(echo ${SAPMACHINE_VERSION} | cut -d. -f1); \
ARCH=; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
chmod 644 /etc/apt/trusted.gpg.d/sapmachine.gpg; \
echo "deb http://dist.sapmachine.io/debian/${ARCH}/ ./" | tee /etc/apt/sources.list.d/sapmachine.list; \
apt-get update; \
- apt-get install -y sapmachine-$(echo ${SAPMACHINE_VERSION} | cut -d. -f1)-jdk=${SAPMACHINE_VERSION} --no-install-recommends; \
+ apt-get install -y sapmachine-${SAPMACHINE_MAJOR_VERSION}-jdk=${SAPMACHINE_VERSION} --no-install-recommends; \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/*; \
apt-get remove --purge --autoremove -y ca-certificates gnupg dirmngr; \
+ ln -s /usr/lib/jvm/sapmachine-${SAPMACHINE_MAJOR_VERSION} ${JAVA_HOME}; \
}; \
sapjvm_install() { \
ARCH=; \
bsdtar -xvf sapjvm-${SAPMACHINE_VERSION}-linux-${ARCH}.zip -C /usr/local --strip-components=1; \
rm -f sapjvm-${SAPMACHINE_VERSION}-linux-${ARCH}.zip; \
apt-get remove --purge --auto-remove -y ca-certificates curl libarchive-tools; \
+ ln -s /usr/local ${JAVA_HOME}; \
} \
&& set -ex \
&& if [ $(echo ${SAPMACHINE_VERSION} | cut -d. -f1) -le 8 ]; then \