Skip to content

[FEAT] how to disable php-fpm? #114

@shuosiw

Description

@shuosiw

Is this a new feature request?

  • I have searched the existing issues

Wanted change

If I don’t need PHP at all, is there a way to prevent it from starting—say, via an environment variable?

Now I'm setting this docker volume mount to disable php-fpm become running.

-v /opt/disable_php:/etc/php84

/opt/disable_php does not have any file.

When the container starts, php-fpm crashes and exits because it can’t find a valid configuration file, so the container ends up without a php-fpm process. However, this feels inelegant—startup still logs noisy error messages.

stderr: [24-Jul-2025 16:54:56] ERROR: failed to open configuration file '/etc/php84/php-fpm.conf': No such file or directory (2)
stderr: [24-Jul-2025 16:54:56] ERROR: failed to load configuration file '/etc/php84/php-fpm.conf'
stderr: [24-Jul-2025 16:54:56] ERROR: FPM initialization failed
stderr: [24-Jul-2025 16:54:57] ERROR: failed to open configuration file '/etc/php84/php-fpm.conf': No such file or directory (2)
stderr: [24-Jul-2025 16:54:57] ERROR: failed to load configuration file '/etc/php84/php-fpm.conf'
stderr: [24-Jul-2025 16:54:57] ERROR: FPM initialization failed

Reason for change

make the container clean.

Proposed code change

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions