FROM openjdk:slim ARG VERSION=6.3 SHELL ["/bin/bash", "-eufo", "pipefail", "-c"] # hadolint ignore=DL3008 RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends -y \ curl \ libarchive-tools && \ curl --progress-bar "https://languagetool.org/download/LanguageTool-$VERSION.zip" |\ bsdtar -x -f - && \ rm -rf /var/lib/apt/lists/* RUN adduser \ --home /LanguageTool-$VERSION \ --no-create-home languagetool COPY --chown=languagetool misc/init.sh / COPY --chown=languagetool misc/ngram.sh / WORKDIR /LanguageTool-$VERSION HEALTHCHECK --timeout=10s --start-period=5s \ CMD curl --fail --data "language=en-US&text=healthcheck test" http://localhost:8010/v2/check || exit 1 CMD [ "bash", "/init.sh" ] USER languagetool EXPOSE 8010