docker-compose up -d
docker-compose down
php5.6.4
php7.1.33
php7.2.13
启动容器 docker start php72
关闭容器 docker stop php72
重启容器 docker restart php72
docker cp php56:/usr/local/etc/php/php.ini D:\Docker\project\docker-php\php56
docker cp D:\Docker\project\docker-php\php56\php.ini php56:/usr/local/etc/php
例如:
docker cp php56:/etc/php5/cli/php.ini D:\Docker\project\docker-php\php56
docker cp php71:/usr/local/etc/php/php.ini-development D:\Docker\project\docker-php\php71
docker cp php72:/usr/local/etc/php/php.ini-development D:\Docker\project\docker-php\php72
1.进入容器 docker exec -it php72 /bin/bash
2.安装扩展 docker-php-ext-install bcmath
1.进入容器 docker exec -it php72 /bin/bash
2.执行命令 php -r 'phpinfo();'
php.ini: error_log = /usr/local/var/log/php_errors.log