Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Temporary image to download the package
FROM maven:3.8 as builder

ADD . /build
WORKDIR /build

RUN apt-get update \
&& apt install -y python3 \
&& ln -s /usr/bin/python3 /usr/bin/python
RUN python3 tools/createCompletionLists.py && mvn verify \
&& VERSION=$(grep "<version>.*</version>" pom.xml | head -n1 | cut -d '>' -f 2 | cut -d '<' -f 1) \
&& cd target \
&& tar xvf ltex-ls-${VERSION}.tar.gz \
&& mv ltex-ls-${VERSION} /app \
&& rm /app/bin/*.bat \
&& find /app -maxdepth 1 -type f -not -name LICENSE.md -delete

# Actual image
FROM openjdk:slim

ENV PATH="${PATH}:/app/bin"
WORKDIR /app/bin
COPY --from=builder /app /app
CMD [ "echo", "Usage: 'ltex-ls [PARAMS]' or 'ltex-cli [PARAMS]'. A directory must be mounted to analyse files using ltex-cli." ]