Usually, there is some kind of configuration directory that is scanned for further files. Try to place a file containing your local settings there, like the following:
php-ini-overrides.ini
:
max_input_vars = 20000
in your Dockerfile
:
FROM php:7.3-alpine3.9
# Project-specific ini settings
COPY ./php-ini-overrides.ini /etc/php7/conf.d/
Another way could be to mount that single file through a Docker volume (this keeps the container configuration cleaner and is more simple if you don't want to use a Dockerfile for other purposes; additionally, you don't need to update the container when changing the configuration, but only restart it):
volumes:
- ./php-ini-overrides.ini:/etc/php7/conf.d/php-ini-overrides.ini
This will work the best way, as you don't have to modify any existing file or keep track of changes from the upstream container
As a short hint: if the solution does not work directly, check whether you need to adjust the folder to put that file into. Another base image might place that folder to another location
php.ini
it's something that I just don't want to do – Expecting