You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Dokku部署paperless-ngx遇`s6-overlay-suexec` PID1错误求助

问题描述

执行命令dokku git:from-image paperless ghcr.io/paperless-ngx/paperless-ngx:latest部署paperless-ngx应用时失败,核心错误为:

s6-overlay-suexec: fatal: can only run as pid 1

完整部署日志如下:

-----> Releasing paperless...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
       No release task found, skipping
=====> Processing deployment checks
 !     No healthchecks found in app.json for web process type
       No web healthchecks found in app.json. Simple container checks will be performed.
       For more efficient zero downtime deployments, add healthchecks to your app.json. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
-----> Deploying paperless via the docker-local scheduler...
-----> Deploying web (count=1)
       Attempting pre-flight checks (web.1)
 !     Container state: exited
279c0a7d74c9c9da5bd800b39181d17fa2e19584b22709d5ceacf0def3aee3e8
 !     Could not start due to 1 failed checks (web.1)
=====> Start of paperless container output (279c0a7d74c9 web.1)
       s6-overlay-suexec: fatal: can only run as pid 1
=====> End of paperless container output (279c0a7d74c9 web.1)
=====> Start of paperless container output (279c0a7d74c9 web.1)
       s6-overlay-suexec: fatal: can only run as pid 1
=====> End of paperless container output (279c0a7d74c9 web.1)
parallel: This job failed:
/var/lib/dokku/plugins/available/scheduler-docker-local/bin/scheduler-deploy-process-container paperless dockerfile dokku/paperless:latest latest web 1 1
原因分析

paperless-ngx镜像使用s6-overlay作为容器初始化管理工具,该工具要求自身启动进程必须是容器内的PID 1。Dokku默认部署逻辑可能修改容器启动上下文,导致s6-overlay无法以PID 1身份运行,触发权限错误。

解决方案

方法一:添加Docker init参数

  1. 为Dokku应用添加docker部署选项,强制使用初始化进程确保PID 1权限:
    dokku docker-options:add paperless deploy "--init"
    
  2. 重新部署应用:
    dokku git:from-image paperless ghcr.io/paperless-ngx/paperless-ngx:latest
    
  3. 验证运行状态:
    dokku ps:status paperless
    dokku logs paperless
    

方法二:覆盖启动命令

如果方法一无效,直接指定镜像的初始化脚本作为启动命令,确保它以PID 1运行:

  1. 设置应用的启动命令:
    dokku config:set paperless DOKKU_DOCKERFILE_CMD="/init"
    
  2. 重新部署应用:
    dokku git:from-image paperless ghcr.io/paperless-ngx/paperless-ngx:latest
    

内容的提问来源于stack exchange,提问作者Bojan Krkic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 15:52:49