Running legacy php5.2 with fpm


I was in a need of running some old php code which works only on php5.2 which is currently not supported.
Efficient deployment of php is possible using PHP Fast Process Manager (FPM), which may be found for this version only as a patch (
The problem is that it does not work on arm architecture(compile error), therefore after digging a while in C sources I was able to backport some code from newer php5.3.
For those of you who run into similar problems, here is a dockerized version of php5.2 with updated fpm patch: