How can I start php-fpm in a Docker container by default?
<p>I have this Docker image - </p>

<pre><code>FROM centos:7
MAINTAINER Me &lt;me.me&gt;
RUN yum update -y
RUN yum install -y git https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

RUN yum install -y ansible
RUN git clone https://github.com/.../dockerAnsible.git
RUN ansible-playbook dockerFileBootstrap.yml
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;

VOLUME [ "/sys/fs/cgroup" ]
EXPOSE 80 443 3306

CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]
</code></pre>

<p>Basically, I want it so that php-fpm starts when the docker container starts.  I have php-fpm working if I manually go into the container and turn it on with <code>/usr/sbin/php-fpm</code>.  </p>

<p>I tried it inside of my ansible file with this command (it didn't work).  I tried using the service module as well with no luck.-</p>

<pre><code> - name: Start php fpm
   command: /usr/sbin/php-fpm
</code></pre>

<p>How can I have php-fpm running along with apache?</p>