Comment puis-je commencer à php-fpm dans un conteneur Docker par défaut?

J'ai cette image Docker -

FROM centos:7
MAINTAINER Me <me.me>
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"]

Fondamentalement, je veux qu'il sorte que php-fpm commence lorsque le conteneur docker commence. J'ai php-fpm de travail si je aller manuellement dans le récipient et de l'activer avec /usr/sbin/php-fpm.

Je l'ai essayé à l'intérieur de mon ansible fichier avec cette commande (il ne fonctionne pas). J'ai essayé d'utiliser le module de service aussi bien avec pas de chance.-

 - name: Start php fpm
   command: /usr/sbin/php-fpm

Comment puis-je avoir de php-fpm l'exécution avec apache?

  • Ajouter un RUN /usr/sbin/php-fpm?
  • Pas de dés. Il ne veut toujours pas démarrer une fois que le conteneur est démarré à l'aide de ce.
InformationsquelleAutor J. Doe | 2016-05-19