aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 81c855ce44d1b549eaae4adf8c2ae7c64c75f3f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM openjdk:slim

ARG VERSION=5.7

RUN apt-get update && \
    apt-get install -y \
        curl \
        libarchive-tools && \
    rm -rf /var/lib/apt/lists/*

RUN curl --progress-bar "https://languagetool.org/download/LanguageTool-$VERSION.zip" |\
    bsdtar -x -f -

RUN adduser \
  --home /LanguageTool-$VERSION \
  --no-create-home languagetool

ADD --chown=languagetool misc/init.sh /
ADD --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