HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /volume1/@appstore/WebStation/misc/php_dockerfile.mustache
FROM {{image_full_name}}

RUN mkdir -p /home/php
WORKDIR /home/php
RUN useradd -u {{user_id}} {{user}}

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions

# install zip for composer install
RUN install-php-extensions zip
{{#extensions}}
RUN install-php-extensions {{.}}
{{/extensions}}

COPY --from=composer:{{composer_version}} /usr/bin/composer /usr/local/bin/composer

# upload composer.json to bundle install
COPY composer.json /home/php/
RUN composer install

# bind php folder to container by docker-compose
ENTRYPOINT php -r '$json = json_encode(ini_get_all()); file_put_contents("default_setting.json", $json);' && PHP_INI_SCAN_DIR={{config}}/conf.d:/run/docker-share/conf.d php-fpm --fpm-config {{config}}/fpm.conf --allow-to-run-as-root --nodaemonize