Skip to content

Commit

Permalink
#57 Add support for linux/arm/v7
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikvl87 committed Apr 3, 2023
1 parent 04d4ff0 commit 349433b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ENV LANG en_US.UTF-8
ARG LANGUAGETOOL_VERSION
RUN git clone https://github.com/languagetool-org/languagetool.git --depth 1 -b v${LANGUAGETOOL_VERSION}
WORKDIR /languagetool
RUN export MAVEN_OPTS="-Xmx2G"
RUN ["mvn", "--projects", "languagetool-standalone", "--also-make", "package", "-DskipTests", "--quiet"]
RUN LANGUAGETOOL_DIST_VERSION=$(xmlstarlet sel -N "x=http://maven.apache.org/POM/4.0.0" -t -v "//x:project/x:properties/x:revision" pom.xml) && unzip /languagetool/languagetool-standalone/target/LanguageTool-${LANGUAGETOOL_DIST_VERSION}.zip -d /dist
RUN LANGUAGETOOL_DIST_FOLDER=$(find /dist/ -name 'LanguageTool-*') && mv $LANGUAGETOOL_DIST_FOLDER /dist/LanguageTool
Expand All @@ -53,12 +54,19 @@ WORKDIR /languagetool
# downloading the matching version of `libhunspell`. The URL may need to change.
FROM alpine:3.17.3

ARG TARGETPLATFORM

RUN apk add --no-cache \
bash \
curl \
libc6-compat \
libstdc++ \
openjdk11-jre-headless
libstdc++

RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ] ; then \
apk add --no-cache openjdk8-jre; \
else \
apk add --no-cache openjdk11-jre-headless; \
fi

# 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
Expand Down

0 comments on commit 349433b

Please sign in to comment.