tiredofit / docker-freescout

Dockerized web based help desk and shared inbox
MIT License
221 stars 92 forks source link

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

Open sglebs opened 8 months ago

sglebs commented 8 months ago

Summary

When deploying to Railway.app I get:

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

Steps to reproduce

Deploy to Railway.app

What is the expected correct behavior?

Locally/docker:

2024-01-03.20:11:59 [NOTICE] ** [monitoring] Container configured for monitoring with 'zabbix modern'
2024-01-03.20:11:59 [NOTICE] ** [scheduling] Container configured for scheduled tasks with 'cron'
2024-01-03.20:11:59 [NOTICE] ** [messaging] Container configured to route mail via SMTP to 'postfix-relay'
2024-01-03.20:11:59 [NOTICE] ** [php-fpm] Creating sample index.php
2024-01-03.20:12:00 [WARN] ** [freescout] Potential New Installation / Standalone Installation Detected - Copying Freescout Sourcecode
2024-01-03.20:12:00 [WARN] ** [freescout] Detected /data directory. Persistently saving settings/sessions/cache/uploads/modules
2024-01-03.20:12:02 [INFO] ** [freescout] Auto Configuring based on Environment Variables
2024-01-03.20:12:07 [WARN] ** [freescout] Installing Modules into container
Cache cleared successfully.
2024-01-03.20:12:17 [INFO] ** [freescout] Initialization Complete. Please visit http://localhost.foo.ai:8888 and login with your credentials..
2024-01-03.20:12:17 [STARTING] ** [nginx] [1] Starting nginx 1.25.3
2024-01-03.20:12:17 [STARTING] ** [monitoring] [1] Starting Zabbix Agent (modern) 6.4.10
2024-01-03.20:12:17 [STARTING] ** [php-fpm] [1] Starting php-fpm 8.2.14
2024-01-03.20:12:17 [STARTING] ** [scheduling] [1] Starting cron

Relevant logs and/or screenshots

This is what I found that is relevant: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2765

It seems to be related to /init

Environment

ARG PHP_VERSION=8.2
ARG DISTRO="alpine"

FROM docker.io/tiredofit/nginx-php-fpm:${PHP_VERSION}-${DISTRO}

Possible fixes

I tried this:

# MQM for Railway.app https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2765
ENTRYPOINT ["exec", "/init"]

But it did not fix it.

tiredofit commented 8 months ago

This image is designed to be run as root - Are you doing anything that would change the user context like user name spaces?

I'm available for custom development to make it NOT work this way.

sglebs commented 8 months ago

I just deployed to Railway.app, which is an inexpensive cloud platform (like a mini heroku) and does not require expensive DevOps talent. Perhaps they do some wrapping that exposes this issue?

I can also try fly.io, which is another cloud platform for poor folks like me . I will update it here.

matharvard commented 3 months ago

I tried deploying to Dokku both with a custom Dockerfile and through Dokku's image deployment feature and got the same error: s6-overlay-suexec: fatal: can only run as pid 1. I'm still tinkering with it and will update if I make any progress, otherwise I'll likely just try and run it directly on Docker.

Update: I was able to get it working after changing this option through Dokku: dokku scheduler-docker-local:set <APP_NAME> init-process false.

1cec0ld commented 3 months ago

I have a relatively surface level understanding of Dokku, but can confirm that deploying via dokku git:from-image <app_name> docker.io/tiredofit/freescout:latest had the same error as above, and was fixed with the same command @matharvard entered. Thank you!

Edit: It may not have completed Initialization steps, however, as I look in the docker logs and it says 30-freescout did not pass completion check. Edit edit: May be my fault for not setting all the environment variables before trying to run it.