Skip to content

--allow-to-run-as-root stopped working in shinsenter/php:8.2-fpm #300

@stefanpejcic

Description

@stefanpejcic

noticed that on a fresh server, image shinsenter/php:8.2-fpm no longer accepts root:root and fails to start:

[04-Aug-2025 12:19:17] ERROR: [pool www] please specify user and group other than root
[04-Aug-2025 12:19:17] ERROR: FPM initialization failed

even with the --allow-to-run-as-root flag:

  php-fpm-8.2:
    image: shinsenter/php:8.2-fpm
    restart: unless-stopped
    environment:
      - APP_USER=root
      - APP_GROUP=root
      - APP_UID=${USER_ID:-0}
      - APP_GID=${USER_ID:-0}
      - ENABLE_TUNING_FPM=1
    command: >
      sh -c "php-fpm --allow-to-run-as-root"

For an older version of the same tag (image from 2025-05-07), this is still working:

php-fpm-8.2  | UID / GID     : root:root (0:0)
php-fpm-8.2  | App Root      : /var/www/html
php-fpm-8.2  | Document Root : /var/www/html
php-fpm-8.2  | ---------------
php-fpm-8.2  | 
php-fpm-8.2  | Docker Images by SHIN Company
php-fpm-8.2  | Copyright (C) 2025 SHIN Company <shin@shin.company>
php-fpm-8.2  | 
php-fpm-8.2  | This software is free under the GNU General Public License (GPL).
php-fpm-8.2  | You can redistribute and/or modify it under the terms of the GNU GPL.
php-fpm-8.2  | This program is provided with the hope that it will be useful,
php-fpm-8.2  | but it comes WITHOUT ANY WARRANTY. For more details, refer to the GNU GPL.
php-fpm-8.2  | 
php-fpm-8.2  | To get support, please contact: SHIN Company <shin@shin.company>
php-fpm-8.2  | Docker Hub:      https://hub.docker.com/u/shinsenter
php-fpm-8.2  | GitHub Packages: https://github.com/shinsenter?tab=packages
php-fpm-8.2  | 
php-fpm-8.2  | PHP 8.2.28 (fpm-fcgi) (built: Apr 29 2025 20:04:14)
php-fpm-8.2  | Copyright (c) The PHP Group
php-fpm-8.2  | Zend Engine v4.2.28, Copyright (c) Zend Technologies
php-fpm-8.2  |     with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies
php-fpm-8.2  | Composer version 2.8.8 2025-04-04 16:56:46
php-fpm-8.2  | 
php-fpm-8.2  | [04-Aug-2025 15:26:32] NOTICE: fpm is running, pid 1
php-fpm-8.2  | [04-Aug-2025 15:26:32] NOTICE: ready to handle connections

that image:

            "Cmd": [
                "sh",
                "-c",
                "php-fpm --allow-to-run-as-root"
            ],
            "Image": "shinsenter/php:8.2-fpm",
            "Volumes": null,
            "WorkingDir": "/var/www/html",
            "Entrypoint": [
                "docker-php-entrypoint"
            ],
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "ab4cdc0bc6ce80ba26b4cc345974e1df513415981266806b60375d69a66d2b80",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.depends_on": "",
                "com.docker.compose.image": "sha256:9256782b0ecf1df150eabf1bcb5c23b679f1793be5aa33815b8a67c474bd1162",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "pcx3",
                "com.docker.compose.project.config_files": "/home/pcx3/docker-compose.yml",
                "com.docker.compose.project.working_dir": "/home/pcx3",
                "com.docker.compose.service": "php-fpm-8.2",
                "com.docker.compose.version": "2.36.0",
                "org.opencontainers.image.authors": "SHIN Company <shin@shin.company>",
                "org.opencontainers.image.created": "2025-05-07T00:19:48+0000",
                "org.opencontainers.image.description": "📦 Simplified PHP Docker images for effortless customization and extension setup.",
                "org.opencontainers.image.documentation": "https://hub.docker.com/r/shinsenter/php",
                "org.opencontainers.image.licenses": "GPL-3.0",
                "org.opencontainers.image.revision": "7201438190b32db46da34fe783a0af4651f039bd",
                "org.opencontainers.image.source": "https://github.com/shinsenter/php/tree/main/src",
                "org.opencontainers.image.title": "shinsenter/php",
                "org.opencontainers.image.url": "https://hub.docker.com/r/shinsenter/php/tags",
                "org.opencontainers.image.vendor": "Docker Hub"
            },
            "StopSignal": "SIGQUIT"

Has anything changed in the syntax or is the flag removed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions