docker-compose.yml
version: '3'
services:
php71:
build:
context: .
dockerfile: ./docker/php71/Dockerfile
working_dir: /var/www/html
command: >
sh -c "
chown -R www-data:www-data /var/www/.composer \
&& su-exec www-data composer install -o \
&& echo 'Logs from /var/log/php/error.log:' \
&& touch /var/log/php/error.log \
&& tail -f /var/log/php/error.log
"
volumes:
- ~/.composer:/var/www/.composer
- .:/var/www/html
- ./docker/php71/php.ini:/usr/local/etc/php/php.ini:ro