Customizing ZendPHP Docker Images via entrypoint.d
Our ZendPHP images provide a number of image configuration and initialization features via the /entrypoint.d/
directory. These facilities are available by default independent of whether you enable the s6-overlay or not.
Features you can take advantage of include:
-
To set the ZendHQ URI configuration value, define the
ZENDHQ_URI
build argument. -
Any
/entrypoint.d/*.sh
files are executed (if executable) or sourced (if not executable), in sorted order. Use these files to perform any bootstrapping required when starting the container. -
All
conf.d/*.ini
files are copied to the production location for purposes of configuring PHP. Generally, you should put any application-specific PHP settings in one or more such files, and prefix them with "99-" to ensure they override any other configuration. -
A
zendhq.ini
file in the/entrypoint.d/
directory is copied to the appropriate location for the purpose of configuring the ZendHQ PHP extension. -
Any directories under the
zray/
subdirectory are used to provide and enable ZendHQ Z-Ray plugins. -
In FPM containers, a
php-fpm.conf
file in the/entrypoint.d/
directory is copied to the appropriate location.We do not recommend customizing this configuration, as the file we provide has appropriate defaults in place. -
In FPM containers,
php-fpm.d/*.conf
files are copied to the appropriate directory for configuring PHP-FPM pools. -
Apache images have additional configuration via
/entrypoint.d/
; see the Customizing Apache Docker Images page for more details.
Using these facilities allows you to more easily customize your ZendPHP images, as well as provide portable configuration should you decide to change the backing OS or OS version in the future.