have you tried?
- M:/libraries/books/calibre:/books
or maybe
- "M:/libraries/books/calibre:/books"
try also to run
docker compose exec calibre-web ls -l /books
this should list the files if the mount was successful.
check also: Just installed docker desktop for windows , do not see many of the options like shared folder - #3 by alexk345
and: Docker -Cannot see option to Share Drives in Settings -Windows 10 Home · Issue #7199 · docker/for-win · GitHub