Repository: silvio/docker-languagetool
Branch: master
Commit: 6b2126251f85
Files: 12
Total size: 15.9 KB
Directory structure:
gitextract_kt9n4r88/
├── .dockerignore
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── main.yml
│ └── test.yml
├── .gitignore
├── COPYING
├── Dockerfile
├── LICENSES/
│ └── LGPL-3.0-or-later.txt
├── Makefile
├── Makefile.version
├── misc/
│ └── start.sh
└── readme.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
*.swp
*.zip
.dockerignore
.git
.gitignore
.travis.yml
Makefile
ngrams
readme.md
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/main.yml
================================================
name: Release for silvio/docker-languagetool
on:
push:
tags:
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+-update[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-update[0-9]+'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Set environment variables
run: |
make envout >> ${GITHUB_ENV}
- name: Prepare system
run: |
make prepare
- name: Build Docker image
run: |
make build
- name: Run tests
run: |
make test
- name: Login Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push tag
run: |
make tag
================================================
FILE: .github/workflows/test.yml
================================================
name: Test for silviof/docker-languagetool
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Set environment variables
run: |
make envout >> ${GITHUB_ENV}
- name: Prepare system
run: |
make prepare
- name: Build Docker image
run: |
make build
- name: Run tests
run: |
make test
================================================
FILE: .gitignore
================================================
ngrams
================================================
FILE: COPYING
================================================
All files of this repository are licensed under the GNU Lesser General Public
License (LGPL) version 3 or later.
SPDX-License-Identifier: LGPL-3.0-or-later
All contributions to this repository are subject to this COPYING file.
================================================
FILE: Dockerfile
================================================
# SPDX-License-Identifier: LGPL-3.0-or-later
FROM docker.io/library/eclipse-temurin:19
# see Makefile.version
ARG VERSION
ARG UNPACKED_VERSION
LABEL maintainer="Silvio Fricke <silvio.fricke@gmail.com>"
ADD ./LanguageTool-"${UNPACKED_VERSION}" /LanguageTool-"${UNPACKED_VERSION}"
WORKDIR /LanguageTool-"${UNPACKED_VERSION}"
COPY misc/start.sh .
CMD [ "bash", "start.sh" ]
USER nobody
EXPOSE 8010
================================================
FILE: LICENSES/LGPL-3.0-or-later.txt
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
================================================
FILE: Makefile
================================================
# SPDX-License-Identifier: LGPL-3.0-or-later
include Makefile.version
envout:
@echo "VERSION=$(VERSION)"
@echo "UNPACKED_VERSION=$(UNPACKED_VERSION)"
@echo "BUILDARG_VERSION=$(BUILDARG_VERSION)"
@echo "IMAGENAME=$(IMAGENAME)"
@echo "BUILDARG_PLATFORM=$(BUILDARG_PLATFORM)"
prepare:
sudo apt-get -qq -y install curl
build: download
docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):latest .
docker buildx build $(BUILDARG_VERSION) --load -t $(IMAGENAME):latest .
download: LanguageTool-$(VERSION).zip
-rm -rf LanguageTool-$(VERSION) LanguageTool-$(UNPACKED_VERSION)
echo ":: unzipping LanguageTool-$(VERSION).zip"
unzip -o LanguageTool-$(VERSION).zip 2>&1 1>/dev/null
LanguageTool-$(VERSION).zip:
curl -L https://www.languagetool.org/download/LanguageTool-$(VERSION).zip -o LanguageTool-$(VERSION).zip
test: test-cleanup.1
test: test-start
test: TESTIPADDRESS=$(subst ",,$(shell docker inspect languagetool | jq '.[0].NetworkSettings.IPAddress'))
test: test-print-ip-address
test: test-run-test-lang
test: test-run-test-en
test: test-run-test-fr
test: test-cleanup.2
test-start:
@echo ""
docker run -d --name languagetool -p 8010:8010 $(IMAGENAME):latest
sleep 6
test-print-ip-address:
@echo "IP address of languagetools docker container: $(TESTIPADDRESS)"
test-run-test-lang:
@echo ""
curl \
-X GET \
--header 'Accept: application/json' \
'http://$(TESTIPADDRESS):8010/v2/languages'
test-run-test-en:
@echo ""
curl \
-X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'text=hello%20woorld&language=en-US&motherTongue=de-DE&enabledOnly=false' \
'http://$(TESTIPADDRESS):8010/v2/check'
test-run-test-fr:
@echo ""
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'text=hello%20woorld&language=fr&motherTongue=de-DE&enabledOnly=false' \
'http://$(TESTIPADDRESS):8010/v2/check'
.PHONY: test-cleanup
test-cleanup.%:
@echo ""
-docker container stop languagetool
-docker container rm languagetool
.PHONY: tag
tag: tag-push
.PHONY: tag-push
tag-push:
docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):latest . --push
docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):$(VERSION) . --push
================================================
FILE: Makefile.version
================================================
# SPDX-License-Identifier: LGPL-3.0-or-later
VERSION := 6.6
UNPACKED_VERSION := $(shell echo $(VERSION) | sed -e 's/\([0-9]\+\.[0-9]\+\)\(.*\)/\1/')
BUILDARG_VERSION := --build-arg VERSION=$(VERSION) --build-arg UNPACKED_VERSION=$(UNPACKED_VERSION)
IMAGENAME := docker.io/silviof/docker-languagetool
BUILDARG_PLATFORM := --platform linux/amd64,linux/arm64/v8,linux/arm/v7
================================================
FILE: misc/start.sh
================================================
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-3.0-or-later
EXTRAOPTIONS=${EXTRAOPTIONS:-}
JAVAOPTIONS=${JAVAOPTIONS:-}
if [ -d "/ngrams" ]; then
EXTRAOPTIONS="${EXTRAOPTIONS} --languageModel /ngrams"
fi
# iterate over environment variables starting with LT_
# and write their names without the LT_ prefix and
# their values to /tmp/config.properties
for var in ${!LT_*}; do
EXTRA_LT=true
echo "${var#'LT_'}="${!var} >> /tmp/config.properties
done
echo JAVAOPTIONS=$JAVAOPTIONS
if [ "$EXTRA_LT" = true ]; then
EXTRAOPTIONS="${EXTRAOPTIONS} --config /tmp/config.properties"
echo config.properties:
echo "$(cat /tmp/config.properties)"
fi
echo EXTRAOPTIONS=$EXTRAOPTIONS
java ${JAVAOPTIONS} -cp languagetool-server.jar org.languagetool.server.HTTPServer --port 8010 --public --allow-origin '*' ${EXTRAOPTIONS}
================================================
FILE: readme.md
================================================
<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->
# Introduction
[LanguageTool] is an Open Source proofreading software for English, French,
German, Polish, and more than 20 other languages.
You can use the LanguageTools with a [firefox-plugin].
This is a Dockerfile to get the languagetools running on a system without java.
[LanguageTool]: https://www.languagetool.org/
[firefox-plugin]: https://addons.mozilla.org/firefox/addon/languagetool
# Usage
The Server is running on port 8010, this port should exposed.
$ docker pull silviof/docker-languagetool
[...]
$ docker run --rm -p 8010:8010 silviof/docker-languagetool
Or you run it in background via `-d`-option.
Run with no minimum rights and RAM
```
docker run --name languagetool \
--cap-drop=ALL \
--user=65534:65534 \
--read-only \
-p 127.0.0.1:8010:8010 \
--memory 412m --memory-swap 500m \
-e EXTRAOPTIONS="-Xmx382M" \
silviof/docker-languagetool:latest
```
Route information can be found at https://languagetool.org/http-api/swagger-ui/#/default, an easy route to test that it's running is `/v2/languages`.
## ngram support
To support [ngrams] you need an additional volume or directory mounted to the
`/ngrams` directory. For that add a `-v` to the `docker run`-command.
docker run ... -v /path/to/ngrams:/ngrams ...
[ngrams]: https://dev.languagetool.org/finding-errors-using-n-gram-data
Download English ngrams with the commands:
mkdir ngrams
wget https://languagetool.org/download/ngram-data/ngrams-en-20150817.zip
(cd ngrams && unzip ../ngrams-en-20150817.zip)
rm -f ngrams-en-20150817.zip
One can use them using web browser plugin "Local server (localhost)" setting by running:
docker run -d --name languagetool -p 127.0.0.1:8081:8010 -v `pwd`/ngrams:/ngrams:ro --restart=unless-stopped silviof/docker-languagetool
gitextract_kt9n4r88/ ├── .dockerignore ├── .github/ │ ├── dependabot.yml │ └── workflows/ │ ├── main.yml │ └── test.yml ├── .gitignore ├── COPYING ├── Dockerfile ├── LICENSES/ │ └── LGPL-3.0-or-later.txt ├── Makefile ├── Makefile.version ├── misc/ │ └── start.sh └── readme.md
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (17K chars).
[
{
"path": ".dockerignore",
"chars": 80,
"preview": "*.swp\n*.zip\n.dockerignore\n.git\n.gitignore\n.travis.yml\nMakefile\nngrams\nreadme.md\n"
},
{
"path": ".github/dependabot.yml",
"chars": 610,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/main.yml",
"chars": 1024,
"preview": "\nname: Release for silvio/docker-languagetool\n\non:\n push:\n tags:\n - '[0-9]+.[0-9]+'\n - '[0-9]+.[0-9]+.[0-9"
},
{
"path": ".github/workflows/test.yml",
"chars": 658,
"preview": "\nname: Test for silviof/docker-languagetool\n\non:\n pull_request:\n workflow_dispatch:\n\njobs:\n build:\n runs-on: ubunt"
},
{
"path": ".gitignore",
"chars": 7,
"preview": "ngrams\n"
},
{
"path": "COPYING",
"chars": 233,
"preview": "All files of this repository are licensed under the GNU Lesser General Public\nLicense (LGPL) version 3 or later.\n\n SP"
},
{
"path": "Dockerfile",
"chars": 400,
"preview": "# SPDX-License-Identifier: LGPL-3.0-or-later\nFROM docker.io/library/eclipse-temurin:19\n\n# see Makefile.version\nARG VERSI"
},
{
"path": "LICENSES/LGPL-3.0-or-later.txt",
"chars": 7652,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007"
},
{
"path": "Makefile",
"chars": 2354,
"preview": "# SPDX-License-Identifier: LGPL-3.0-or-later\n\ninclude Makefile.version\n\nenvout:\n\t@echo \"VERSION=$(VERSION)\"\n\t@echo \"UNPA"
},
{
"path": "Makefile.version",
"chars": 372,
"preview": "# SPDX-License-Identifier: LGPL-3.0-or-later\nVERSION := 6.6\nUNPACKED_VERSION := $(shell echo $(VERSION) | sed -e 's/\\([0"
},
{
"path": "misc/start.sh",
"chars": 836,
"preview": "#!/usr/bin/env bash\n# SPDX-License-Identifier: LGPL-3.0-or-later\n\nEXTRAOPTIONS=${EXTRAOPTIONS:-}\nJAVAOPTIONS=${JAVAOPTIO"
},
{
"path": "readme.md",
"chars": 2010,
"preview": "<!-- SPDX-License-Identifier: LGPL-3.0-or-later -->\n\n# Introduction\n\n[LanguageTool] is an Open Source proofreading soft"
}
]
About this extraction
This page contains the full source code of the silvio/docker-languagetool GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 12 files (15.9 KB), approximately 4.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.