github网址:
GitHub - Stirling-Tools/Stirling-PDF: #1 Locally hosted web application that allows you to perform various operations on PDF files
1、官方docker镜像无法拉取,使用别人阿里云私人镜像仓库下载Stirling-PDF镜像:
registry.cn-hangzhou.aliyuncs.com/jeson/s-pdf:0.26.1-fat
2、部署Stirling-PDF
创建PDF目录
mkdir -p /data/s-pdf && cd /data/s-pdf
创建docker-compose.yaml,及配置:
vim docker-compose.yaml
下面端口和账号密码可以自行设置
version: '3.9'
services:
stirling-pdf:
image: registry.cn-hangzhou.aliyuncs.com/jeson/s-pdf:0.26.1-fat
container_name: Stirling-PDF
ports:
- '6080:8080'
volumes:
- /data/s-pdf/trainingData:/usr/share/tessdata # OCR 语言支持
- /data/s-pdf/extraConfigs:/configs
- /data/s-pdf/customFiles:/customFiles/
- /data/s-pdf/logs:/logs/
environment:
DOCKER_ENABLE_SECURITY: true # 启用内部安全功能
SECURITY_ENABLELOGIN: true # 启用登录功能
SECURITY_INITIALLOGIN_USERNAME: root # Stirling-PDF登录账号
SECURITY_INITIALLOGIN_PASSWORD: root # Stirling-PDF登录密码
UI_APPNAME: PDF # 自定义导航标题
INSTALL_BOOK_AND_ADVANCED_HTML_OPS: false
LANGS: zh_CN # 设置语言
3、创建Stirling-PDF容器
docker compose up -d
查看容器状态
docker compose ps