How to install custom extensions in php docker image?

Hello,
How to install additional php extensions in php docker image? can anyone here provider link to tutorial or instructions with examples?

Thanks