You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by dm...@apache.org on 2020/12/01 18:08:04 UTC
[tika-docker] branch master updated: Added how to specify custom
config to README
This is an automated email from the ASF dual-hosted git repository.
dmeikle pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika-docker.git
The following commit(s) were added to refs/heads/master by this push:
new f5effe9 Added how to specify custom config to README
f5effe9 is described below
commit f5effe9e1ad5c10a60eb287fc3ab3f1554bd3a3c
Author: Dave Meikle <dm...@apache.org>
AuthorDate: Tue Dec 1 18:07:54 2020 +0000
Added how to specify custom config to README
---
README.md | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/README.md b/README.md
index c7e39e9..f5ba627 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,8 @@ You can see a full set of tags for historical versions [here](https://hub.docker
## Usage
+### Default
+
You can pull down the version you would like using:
docker pull apache/tika:<tag>
@@ -44,6 +46,30 @@ Where <tag> is the DockerHub tag corresponding to the Apache Tika Server version
NOTE: The latest and latest-full tags are explicitly set to the latest released version when they are published.
+### Custom Config
+
+From version 1.25 and 1.25-full of the image it is now easier to override the defaults and pass parameters to the running instance.
+
+So for example if you wish to disable the OCR parser in the full image you could write a custom configuration:
+
+```
+cat <<EOT >> tika-config.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<properties>
+ <parsers>
+ <parser class="org.apache.tika.parser.DefaultParser">
+ <parser-exclude class="org.apache.tika.parser.ocr.TesseractOCRParser"/>
+ </parser>
+ </parsers>
+</properties>
+EOT
+```
+Then by mounting this custom configuration as a volume, you could pass the command line parameter to load it
+
+ docker run -d -p 9998:9998 -v `pwd`/tika-config.xml:/tika-config.xml apache/tika:1.25-full --config /tika-config.xml
+
+You can see more configuration examples [here](https://tika.apache.org/1.25/configuring.html).
+
## Building
To build the image from scratch, simply invoke: