Answer the question
In order to leave comments, you need to log in
How to run two versions of php with Docker(or without it) + ZendGuardLoader on nginx?
One of the sites requires php from 5.3 to 5.4.3, the main version on the server is 5.6.
I dug up a lot of information, and came to the conclusion that I need to install the required version of php in Docker.
Dockerfile:
#base image name
FROM ubuntu:12.04
RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get update
#установка необходимых пакетов
RUN apt-get install -y php5 php5-fpm php5-mysql
#заставим php-fpm слушать не только localhost
RUN sed -i "s/listen = 127.0.0.1:9000/listen = 9000/g" /etc/php5/fpm/pool.d/www.conf
docker build -t php-fpm53 - < Dockerfile
docker run -d -i -p 9010:9000 -v /var/www/:/var/www/:rw php-fpm53 /bin/sh -c "service php5-fpm start && /bin/bash"
fastcgi_pass 127.0.0.1:9010;
Answer the question
In order to leave comments, you need to log in
And what's the problem to shove it into the same container?
Download the zend-guard distribution, unpack and put the files next to the dockerfile . Put
the configs with the necessary edits next to it.
With the help of the "CP" command in the dockerfile, push everything in place.
Profit?
You can write a script and file everything through RUN
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question