#!/bin/sh set -e FPM_CONFIG_DIR=/usr/local/etc/php-fpm.d read_env_config() { prefix=$1 output=$2 env | grep -E "^$prefix\..+=.+" | while IFS='=' read -r config_name config_value; do echo "${config_name#*.} = $config_value" >> "$output" done } read_env_config PHP $PHP_INI_DIR/conf.d/zz-docker-env.ini read_env_config PHP_FPM $FPM_CONFIG_DIR/zz-docker.conf php-fpm -D exec "$@"