As mentioned in the comments on the original question, php: fpm image requires its volume to be set to /var/www/html .
If you want to use a different directory, you can get around this using your own Docker file (based on php: fpm). For this, a Dockerfile would be helpful:
FROM php:fpm WORKDIR /var/www
Setting the working drive to the correct directory seems to do the trick.
Then in your docker-compose.yml you will create a Docker using this file instead of directly using the php: fpm image.
version: "2" services:
source share