Docker image, containers and layers
This is what I would to better handle the base docker images lifecycle:

Create a git repo to save your Dockerfile + configs
Create a Dockerfile with alpine + all the configs/libraries you want
Add your php.ini + php-cli.ini configs
Have a Jenkins job to start on each push to that repo:

Build your docker image
Tag it incrementally
Push to your registry


Use that base image to create your final docker image