blob: 32e0d5325bfc011b7e44d3cab6bb4ccd9c5a1e21 (
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
27
28
29
30
31
32
33
34
35
36
|
FROM openjdk:slim
ARG VERSION=6.3
WORKDIR /home/languagetool
SHELL ["/bin/bash", "-eufo", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN \
groupadd -g 1000 languagetool && \
adduser \
--uid 1000 \
--gid 1000 \
--home /home/languagetool \
--no-create-home languagetool && \
chown -R languagetool:languagetool /home/languagetool && \
export DEBIAN_FRONTEND=noninteractive && \
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/*
COPY --chown=languagetool misc/init.sh /
COPY --chown=languagetool misc/ngram.sh /
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" ]
WORKDIR /home/languagetool/LanguageTool-$VERSION
USER languagetool
EXPOSE 8010
|