I have the following docker-compose.yml
web:
image: nginx
ports:
- "80:80"
volumes:
- ./src:/var/www
- ./src/vhost.conf:/etc/nginx/sites-enabled/vhost.conf
links:
- php
php:
image: nmcteam/php56
volumes:
- ./src/php-fpm.conf:/etc/php5/fpm/php-fpm.conf
- ./src:/var/www
links:
- db
db:
image: sameersbn/mysql
ports:
- "3306:3306"
volumes:
- /var/lib/mysql
environment:
- DB_NAME=demoDb
- DB_USER=demoUser
- DB_PASS=demoPass
Everything works fine but what I would like is to link php to mysql installed on host machine. Is there a way I could achieve this?
Thank you.