Open smortexa opened 7 months ago
It's likely because you must use a ZTS version of the php-cli image.
I switched to using php8.3-zts-bookworm
instead of php8.3-cli-bookworm
in Dockerfile, and although the GitHub Actions test passed successfully, I'm still facing issues as it fails to start on my machine (M1) with exit code 139:
2024-02-10 20:12:47,010 INFO Set uid to user 1000 succeeded
2024-02-10 20:12:47,012 INFO supervisord started with pid 1
2024-02-10 20:12:48,013 INFO spawned: 'octane_00' with pid 19
INFO Server running…
Local: http://0.0.0.0:80
Press Ctrl+C to stop the server
WARN server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server
WARN unable to get instance ID; storage clean stamps will be incomplete
2024-02-10 20:12:48,754 WARN exited: octane_00 (exit status 139; not expected)
Set uid to user 1000 succeeded
Local: http://0.0.0.0:80
You cannot bind to a privileged port with an unprivileged user.
Could you provide a reproducer?
TBH there is a log of weird things in these images 🗡️:D
Couldn't you use the official FrankenPHP images instead of copying a binary in the ZTS images? This will ensure that everything is compiled as it should and the images are extending the official PHP ones.
I used FrankenPHP official base image, but the problem still exists. see: https://github.com/smortexa/frankenphp-reproduce-566#steps-to-reproduce-exit-status-139
I'm not sure why all these things are in the container together. Why not have multiple containers/targets and simply share the resources you need to share (disk/network/shm/whatever) in a docker-compose file or pod?
What happened?
When dockerizing a Laravel Octane application, I found that using the FrankenPHP binary from GitHub releases works successfully:
https://github.com/exaco/laravel-octane-dockerfile/blob/0e6e218774c6a4166b91f461aa99098fd23e159b/FrankenPHP.Dockerfile#L191
However, when attempting to copy the binary from the FrankenPHP docker images to support various PHP versions, the server fails to start, displaying the following error logs:
https://github.com/exaco/laravel-octane-dockerfile/blob/99e9251d7505fe358c3bdadde2c51e2f21801190/FrankenPHP.Dockerfile#L195
Here is the complete log:
Build Type
Docker (Debian Bookworm)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64