Docker install php5.6 and lighttpd on ubuntu 16.04

Due to the EOL of Ubuntu 14.04, I am trying to migrate from 14.04 to 16.04.
Unfortunately, 16.04 LTS supports php 7 by default and our code base is written in PHP 5.
The libraries related to PHP 5 such as php5-cgi php5-mysql php5-curl are not supported any more on Xenial.
Hence I am trying to use PHP 5.6 so that there is no change to the code for the moment.

My Docker file has the below code which installs only lighttpd and php5.6.

FROM ubuntu:16.04

RUN apt-get update -y

ENV DEBIAN_FRONTEND noninteractive

install php5.6 and web server

RUN apt-get purge `dpkg -l | grep php| awk '{print $2}' | tr "n" " "` 
    && apt-get install -y software-properties-common 
    && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php 
    && apt-get update -y 
    && apt-get purge --auto-remove ubuntu-core-launcher 
    && apt-get install -y lighttpd php5.6 php5.6-fpm php5.6-cgi

RUN apt-get install -y vim net-tools

RUN mkdir /srv/app && mkdir /srv/run

WORKDIR /srv/app

ADD . /srv/app

change permissions for lighttpd files

RUN chmod -R 777 /var/log/lighttpd && chmod -R 777 /var/cache/lighttpd && chmod -R 775 /srv/run
RUN touch /srv/run/lighttpd.pid && chmod 777  /srv/run/lighttpd.pid

lighttpd config

RUN sed -i -e "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" /etc/php/5.6/fpm/php.ini

RUN sed -i -e "s/server.document-root/#server.document-root/g" /etc/lighttpd/lighttpd.conf 
    && sed -i -e 's//var/run/lighttpd.pid//srv/run/lighttpd.pid/g' /etc/lighttpd/lighttpd.conf 
    && sed -i -e "s/80/8888/g" /etc/lighttpd/lighttpd.conf 
    && echo "server.document-root = "/srv/app"" >> /etc/lighttpd/lighttpd.conf 
    && echo "server.network-backend = "writev"" >> /etc/lighttpd/lighttpd.conf 
    && echo "server.modules += ("mod_fastcgi")" >> /etc/lighttpd/lighttpd.conf

EXPOSE 8888

ENTRYPOINT ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]

Run command: docker run -d  -p 8888:8888 test-image:4.0

I have an index.html – Hello world code in my working folder and after I run, I am able to get the index.html on my localhost:8888/index.html
I also have an index.php that displays phpinfo() and when I try localhost:8888/index.php, I get a 403 Forbidden error.

I also tried adding the below lines in the Dockerfile,

RUN mv /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled

RUN sed -i -e "s/php-cgi/php-cgi5.6/g" /etc/lighttpd/conf-enabled/15-fastcgi-php.conf

After build and run the server exits immediately,
docker ps -a gives the status as Exited(0).

It would be helpful if anyone can help me figure out how to make my php code run with this docker configuration.
Thanks.

Source: StackOverflow