FROM alpine:latest

ENV version=15.2.0

RUN apk add --no-cache openjdk11-jre-headless \
    && wget https://github.com/valentjn/ltex-ls/releases/download/${version}/ltex-ls-${version}.tar.gz \
    && tar x -zf ltex-ls-${version}.tar.gz \
    && mv ltex-ls-${version} ltex-ls \
    && rm -rf ltex-ls-${version}.tar.gz

ENTRYPOINT ["/ltex-ls/bin/ltex-ls"]
