好吧,继续造。今天用8010,IP用 172.18.3.2/24

造网络
docker network create --subnet=172.18.3.0/24 stirling-pdf-network

官网docker run,要是担心的话就跑一下再说。

docker run -d \
  --name stirling-pdf \
  -p 8080:8080 \
  -v "./StirlingPDF/trainingData:/usr/share/tessdata" \
  -v "./StirlingPDF/extraConfigs:/configs" \
  -v "./StirlingPDF/customFiles:/customFiles/" \
  -v "./StirlingPDF/logs:/logs/" \
  -v "./StirlingPDF/pipeline:/pipeline/" \
  -e DISABLE_ADDITIONAL_FEATURES=true \
  -e LANGS=en_GB \
  docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest

我这里就不跑了,直接上修改版。
(有点好奇啊,这东西就不能-v个数据库?算了到时候再说)

docker run -d \
  --name stirling-pdf \
  --restart=always \
  --network stirling-pdf-network \
  --ip 172.18.3.2 \
  -e SERVER_PORT=8010 \
  -e DISABLE_ADDITIONAL_FEATURES=true \
  -e LANGS=en_GB \
  -p 8010:8010 \
  -v /root/StirlingPDF/trainingData:/usr/share/tessdata \
  -v /root/StirlingPDF/extraConfigs:/configs \
  -v /root/StirlingPDF/customFiles:/customFiles/ \
  -v /root/StirlingPDF/logs:/logs/ \
  -v /root/StirlingPDF/pipeline:/pipeline/ \
  docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest

直接就好了,访问IP+8010。

NGINX反代。

注释掉这些东西

#  root /data/wwwroot/docker.wingsrabbit.com;

#  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
#    expires 30d;
#    access_log off;
#  }
#  location ~ .*\.(js|css)?$ {
#  expires 7d;
#   access_log off;
#  }

在localtion well know之后加这一段。

#Nginx-443-Start
  location / {
      proxy_pass http://127.0.0.1:8010;
      proxy_ssl_verify off;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
  }
最后修改:2025 年 10 月 19 日
如果觉得我的文章对你有用,请随意赞赏