file-to-markdown-docker

Instructions for running Apache Tika in Docker, a way to run software in an isolated container. Tika reads documents and can use the full image for OCR, which extracts text from scanned pages and images, or geospatial raster support.

In plain words
What is it for?
Use it to start Tika for scanned PDFs, document photos, image-only files, geospatial rasters, or other files that need container-based parsing.
Why use it?
It provides document parsing without installing Java locally and explains which container image and mounting settings fit the task.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/apache/tika/file-to-markdown-docker
Any agent
npx skills add apache/tika --skill file-to-markdown-docker
Clone the repo
git clone --depth 1 https://github.com/apache/tika

Made for: Claude Code, Codex.

Per session 158 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00158 $0.02644
Opus 5 $0.00079 $0.01322
Sonnet 5 $0.00032 $0.00529
Haiku 4.5 $0.00016 $0.00264

Measured 3d ago against content hash b8d7b4df7805, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

file-to-markdown-docker scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -T document.pdf http://localhost:9998/tika
.skills/users/file-to-markdown-docker/SKILL.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Local override: $TIKA_SKILLS_LOCAL/file-to-markdown-docker/LOCAL.md (default ~/.tika-skills), read after this file, wins on conflict.

Running Apache Tika via Docker

Two images on Docker Hub: apache/tika (REST server, port 9998) and apache/tika-grpc (gRPC, port 9090). This skill covers apache/tika; the file-to-markdown companion skill covers the parsing calls in more depth once the container is up (same HTTP API either way), but the examples below are enough to parse on their own.

The Docker route needs no local Java at all — the container brings its own. If the host lacks Java 17+ (Tika 4.x's requirement), this is the easiest path, not just the OCR path. This skill describes Tika 4.x images; on a 3.x image the default output is XHTML, not Markdown.

Minimal vs -full — the choice that matters

apache/tika:<version>        # JRE + tika-server-standard, pure-Java parsers only
apache/tika:<version>-full   # + Tesseract OCR, GDAL, ImageMagick, font sets

Take -full if the task involves OCR (scanned PDFs, photos of documents, image-only PDFs) or geospatial rasters — otherwise take minimal. A scanned PDF parsed against the minimal image doesn't error; it just silently returns little or no text, because there's no Tesseract to run. If output looks suspiciously short for a document that's clearly a scan, that's the signal you're on the wrong image, not that the file has no text — see Confirming OCR actually ran, below.

Read the full file on GitHub · 227 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 227 lines · 158 tokens per session scan A b8d7b4df7805

Subscribe to this mod's changes

file-to-markdown-docker is a skill published in the GitHub repository apache/tika (4,028 stars, last pushed today), licensed Apache-2.0. It adds 158 tokens to every session and 2,644 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.