nddipiazza opened a new pull request, #3:
URL: https://github.com/apache/tika-grpc-docker/pull/3
## Problem
Plugins were copied to `/tika-plugins` but pf4j couldn't extract them
because:
- pf4j requires write permission to extract ZIP files in the same directory
- Running as non-root user (35002:35002) prevented extraction in
`/tika-plugins`
- This violated Kubernetes best practices for read-only root filesystems
## Solution
**Copy plugins from read-only location to writable /tmp at startup:**
- Plugin ZIPs stored in `/opt/tika-plugins/` (read-only)
- At container startup, copy to `/tmp/tika-plugins/` (writable)
- pf4j extracts plugins in `/tmp/tika-plugins/`
- Maintains Kubernetes-friendly read-only root filesystem
## Changes
1. **Dockerfile.local & Dockerfile.source:**
- Copy plugins to `/opt/tika-plugins/` during build
- Entrypoint copies ZIPs to `/tmp/tika-plugins/` at startup
- No need for VOLUME or writable mount
2. **build-from-branch.sh:**
- Finds and copies all plugin ZIPs from tika build
- Logs count of plugins copied
3. **sample-configs/test-simple.json:**
- Added `plugin-roots`: ["/tmp/tika-plugins"]
## Testing
Successfully tested with local build:
```
./build-from-branch.sh -l /path/to/tika -t local
```
Container logs show **10+ plugins loaded successfully:**
- tika-pipes-file-system-plugin ✓
- tika-pipes-http-plugin ✓
- tika-pipes-s3-plugin ✓
- tika-pipes-solr-plugin ✓
- tika-pipes-ignite-plugin ✓
- And more...
## Configuration Required
Users must include in their `tika-config.json`:
```json
{
"plugin-roots": ["/tmp/tika-plugins"]
}
```
## Kubernetes Compatibility
✅ Works with read-only root filesystem
✅ Uses /tmp which is typically writable
✅ No special volumes or permissions needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]