Apache Tika Server image with Portuguese OCR (Tesseract por + eng), ImageMagick preprocessing, and a fixed tika-config.xml.
Built on top of [apache/tika](https://hub.docker.com/r/apache/tika) (*-full variant).
| Tag | Description |
|---|---|
nextstage/tika-service:3.3 | Tika 3.3.0.0-full |
docker pull nextstage/tika-service:3.3
docker run --rm -d \
--name tika \
-p 9998:9998 \
nextstage/tika-service:3.3
Health check:
curl -s http://localhost:9998/tika
# Apache Tika Server ...
services:
tika:
image: nextstage/tika-service:3.3
ports:
- "9998:9998"
restart: unless-stopped
Default port: 9998.
curl -X PUT --data-binary @document.pdf \
http://localhost:9998/detect/stream
curl -X PUT --data-binary @document.pdf \
-H "Accept: text/plain" \
http://localhost:9998/tika
curl -X PUT --data-binary @document.pdf \
-H "Accept: text/html" \
http://localhost:9998/tika
curl -X PUT --data-binary @document.pdf \
-H "Accept: application/json" \
http://localhost:9998/meta
curl -X PUT --data-binary @archive.zip \
-H "Accept: application/json" \
http://localhost:9998/rmeta
OCR is enabled for Portuguese and English (por+eng). Preprocessing uses ImageMagick (density 300, timeout 180s).
curl -X PUT --data-binary @scan.png \
-H "Accept: text/plain" \
-H "X-Tika-OCRLanguage: por+eng" \
http://localhost:9998/tika
curl -X PUT --data-binary @scanned.pdf \
-H "Accept: text/plain" \
http://localhost:9998/tika
$ch = curl_init('http://tika:9998/tika');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => file_get_contents('/path/to/file.pdf'),
CURLOPT_HTTPHEADER => ['Accept: text/plain'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 180,
]);
$text = curl_exec($ch);
curl_close($ch);
[tika-config.xml](./tika-config.xml) is baked into the image at /tika-config.xml:
TesseractOCRParser with:
language: por+engpageSegMode: 4density: 300enableImagePreprocessing: truetimeoutSeconds: 180minFileSizeToOcr: 0This image layers config and packages on Apache Tika. Tika is licensed under the Apache License 2.0.
Content type
Image
Digest
sha256:053150cf6…
Size
333.7 MB
Last updated
26 days ago
docker pull nextstage/tika-service