All of these extensions are available in Alpine repositories, so why are you making your life harder and installs them directly from PECL? Install them simply using
- php7-mongodb (currently only in testing repository)
Note that these packages are in Alpine v3.7 (the latest stable release), I haven’t checked if they are available also in older releases.
These packages, of course, installs config files with
extension=<ext>.so, so don’t add it manually to
apk add php7=7.1.9-r0
Why do you specify exact version? This will fail once we update the package (e.g. with security patches), because only the latest version of packages is available in the repositories. We backport only security fixes and bugfixes (i.e. patch versions) into stable releases, so there will not be 7.2.x in v3.6 or v3.7.