diff --git a/Dockerfile b/Dockerfile index 1ebe594..c5ebeb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG LANGUAGETOOL_VERSION=6.0 -FROM debian:buster as build +FROM debian:bullseye as build ENV DEBIAN_FRONTEND=noninteractive @@ -14,6 +14,14 @@ RUN apt-get update -y \ maven \ unzip \ xmlstarlet \ + + # packages required for arm64-workaround + build-essential \ + cmake \ + mercurial \ + texlive \ + wget \ + zip \ && apt-get clean RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ @@ -31,10 +39,14 @@ RUN LANGUAGETOOL_DIST_FOLDER=$(find /dist/ -name 'LanguageTool-*') && mv $LANGUA # Execute workarounds for ARM64 architectures. # https://github.com/languagetool-org/languagetool/issues/4543 WORKDIR / -COPY arm64-workaround/. . -RUN chmod +x ./bridj.sh ./hunspell.sh -RUN bash -c "./bridj.sh" -RUN bash -c "./hunspell.sh" +COPY arm64-workaround/bridj.sh arm64-workaround/bridj.sh +RUN chmod +x arm64-workaround/bridj.sh +RUN bash -c "arm64-workaround/bridj.sh" + +COPY arm64-workaround/hunspell.sh arm64-workaround/hunspell.sh +RUN chmod +x arm64-workaround/hunspell.sh +RUN bash -c "arm64-workaround/hunspell.sh" + WORKDIR /languagetool # Note: When changing the base image, verify that the hunspell.sh workaround is @@ -46,7 +58,7 @@ RUN apk add --no-cache \ curl \ libc6-compat \ libstdc++ \ - openjdk11-jre-headless + openjdk11-jdk # https://github.com/Erikvl87/docker-languagetool/issues/60 RUN ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2 diff --git a/arm64-workaround/bridj.patch b/arm64-workaround/bridj.patch deleted file mode 100644 index 92446cd..0000000 --- a/arm64-workaround/bridj.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/BuildNative b/BuildNative -index d6de087..a63227e 100755 ---- a/BuildNative -+++ b/BuildNative -@@ -29,35 +29,7 @@ UNAME_ARCH=`uname -m` - UNAME_OS=`uname -s | sed s/_NT-.*/_NT/` - - function get_arch() { -- if [[ -n "$ARCH" ]]; then -- echo "$ARCH" -- elif [[ "$UNAME_OS" == "SunOS" ]]; then -- if [ "`isainfo -n`" = "amd64" ]; then -- echo "x64" -- else -- echo "x86" -- fi -- elif [[ "$UNAME_OS" == "Darwin" ]]; then -- echo "universal" -- else -- case $UNAME_ARCH in -- i86pc|i386|i486|i586|i686|x86) -- echo x86 -- ;; -- x86_64|amd64) -- echo x64 -- ;; -- arm*) -- if [[ -d /lib/arm-linux-gnueabihf ]] ; then -- echo "armhf" -- elif [[ -d /lib/arm-linux-gnueabi ]] ; then -- echo "armel" -- else -- failed "Unknown Linux arm flavour: please edit $0 and Platform.java" -- fi -- ;; -- esac -- fi -+ echo "aarch64" - } - - function get_os() { -diff --git a/pom.xml b/pom.xml -index ec9a1b4..f97fe68 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -87,6 +87,15 @@ - - - -+ -+ org.apache.maven.plugins -+ maven-compiler-plugin -+ 3.8.1 -+ -+ 1.8 -+ 1.8 -+ -+ -