用户名:  密码:   
您当前的位置:首页 > 电脑与网络 >  Linux > 

在Linux的docker下安装StirlingPDF工具

上次修改时间: 2024-01-31 10:24:21      来源:网络总结      作者:钢铁长陈
上一页      路径:DSD\Learn\linux\      下一页

在Linux的docker下安装StirlingPDF工具

来自:https://blog.csdn.net/jks212454/article/details/133389331
1. 使用Xshell7登录linux,注:这里linux已安装,并安装过宝塔,且也安装了docker

2. 判断SSH服务有没有开启
[root@localhost ~]# service ssh status
Redirecting to /bin/systemctl status ssh.service
Unit ssh.service could not be found.
[root@localhost ~]# ps -e |grep ssh
   996 ?        00:00:00 sshd
 31717 ?        00:00:00 sshd

3. 判断docker有没有安装并开启
[root@localhost ~]# clear
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since 一 2024-01-29 18:05:41 CST; 1 day 15h ago
     Docs: https://docs.docker.com
 Main PID: 1259 (dockerd)
    Tasks: 8
   Memory: 32.5M
   CGroup: /system.slice/docker.service
           └─1259 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
4. 检查docker的版本,要求大于20.10
[root@localhost ~]# docker -v
Docker version 24.0.7, build afdd53b
5. 检查docker compose版本,要求2.0以上
[root@localhost ~]# docker compose version
Docker Compose version v2.21.0

5. 下载stirling-Pdf镜像
[root@localhost ~]# docker pull frooodle/s-pdf:latest
latest: Pulling from frooodle/s-pdf
Digest: sha256:6944b5e8ee659fa66db28376688bc0fa4c9891940e1e84fc69705e15bb4dfcf9
Status: Image is up to date for frooodle/s-pdf:latest
docker.io/frooodle/s-pdf:latest

6. 使用docker-cli创建Stirling-PDF容器
[root@localhost ~]# docker run -d \
>   -p 8380:8080 \
>   -v /data/stirling-pdf/data/:/usr/share/tesseract-ocr/4.00/tessdata \
>   -v /data/stirling-pdf/configs/:/configs \
>   -e DOCKER_ENABLE_SECURITY=false \
>   --name stirling-pdf \
>   frooodle/s-pdf:latest
306a1212d1a5541b63e1ede01017b699cf6cd97e3216b3524a12c802bad84240

7. 查看docker容器的状态,运行了那些
[root@localhost ~]# docker ps
CONTAINER ID   IMAGE                   COMMAND                   CREATED          STATUS          PORTS                                       NAMES
306a1212d1a5   frooodle/s-pdf:latest   "/scripts/init.sh ja…"   17 seconds ago   Up 15 seconds   0.0.0.0:8380->8080/tcp, :::8380->8080/tcp   stirling-pdf

8. 检查Stirling-PDF容器日志
[root@localhost ~]# docker logs stirling-pdf
Copying original files without overwriting existing files
cp: cannot stat '/usr/share/tesseract-ocr/4.00/tessdata/*': No such file or directory
Running Stirling PDF with DOCKER_ENABLE_SECURITY=false and VERSION_TAG=0.20.1
Picked up JAVA_TOOL_OPTIONS:  -XX:MaxRAMPercentage=75
External configuration file 'configs/settings.yml' does not exist. Using default configuration and environment configuration instead.
 ____ _____ ___ ____  _     ___ _   _  ____       ____  ____  _____
/ ___|_   _|_ _|  _ \| |   |_ _| \ | |/ ___|     |  _ \|  _ \|  ___|
\___ \ | |  | || |_) | |    | ||  \| | |  _ _____| |_) | | | | |_  
 ___) || |  | ||  _ <| |___ | || |\  | |_| |_____|  __/| |_| |  _| 
|____/ |_| |___|_| \_\_____|___|_| \_|\____|     |_|   |____/|_|                                                                
Powered by Spring Boot 3.2.1
01:26:22.768 [main] INFO  s.software.SPDF.SPdfApplication - Starting SPdfApplication using Java 17.0.9 with PID 1 (/app.jar started by root in /)
01:26:22.775 [main] INFO  s.software.SPDF.SPdfApplication - No active profile set, falling back to 1 default profile: "default"
01:26:26.074 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
01:26:26.098 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
01:26:26.104 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
01:26:26.104 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.17]
01:26:26.296 [main] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
01:26:26.304 [main] INFO  o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 3430 ms
01:26:27.203 [main] INFO  s.s.S.config.EndpointConfiguration - Disabling pdf-to-book
01:26:27.205 [main] INFO  s.s.S.config.EndpointConfiguration - Disabling book-to-pdf
01:26:27.216 [main] INFO  s.s.SPDF.config.PostStartupProcesses - No custom apps to install.
01:26:29.184 [main] INFO  o.s.b.a.e.web.EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
01:26:29.267 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
01:26:29.394 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path ''
01:26:29.449 [main] INFO  s.software.SPDF.SPdfApplication - Started SPdfApplication in 7.475 seconds (process running for 9.244)
Stirling-PDF Started.
Navigate to http://localhost:8080
[root@localhost ~]# ^C
[root@localhost ~]#