Addition:
Editing the .htaccess file is often used as a workaround in order to make changes on shared hosting platforms where you don’t have access to the Apache and / or PHP config files. However, since you are using Docker there are probably better ways to apply your configuration changes, instead of adding them to the .htaccess file…