I have installed PHP 7 (php-fpm and php-cli) and my app is working fine with new PHP, but tests (phpunit) don't because some extensions aren't updated yet.
So I'm thinking to use/create some docker container with PHP 5.6 that would replace my system's (host) php-cli.
For example, if I build container called php56
from Dockerfile that looks like this:
FROM ubuntu:15.10
RUN apt-get -y update && apt-get install -y php5-cli
ENTRYPOINT ["php"]
and run:
sudo docker run -it php56 -v
I'm getting version info from Docker container, so docker's php-cli 5.6 is working. So I wan't to put docker run
command in
/usr/bin/php
so that host use php-cli from docker container. (then php -v would give me PHP 5.6 info not PHP 7.0 version info)
It's not best example, but I hope that you guys will understand what I'm trying to do. If it's not possible to solve it like this, please recommend me other solution.