I’m having this issue too, after upgrading to Docker Desktop 4.40.0 on macOS 15.4 (2023 MacBook Pro).
The issue seems to be that the bind mount specification in my docker compose file uses an environment variable to specify the host path, but the environment variable seems to be not evaluated / available before the mount specification is parsed:
The version with volumes specified with the help of Environment Variables worked in previous versions through 4.38.
In @arpadt’s case, I believe the issue is that Docker Desktop now requires the path specifications to be absolute (so using . to specify the current directory won’t work).
Your issue was completely different, so I moved it out from the original topic to its own.
In your case, the problem is probably how Docker Compose interprets environment variables. It is not Docker Desktop that does it. Docker Desktop just comes with a specific compose version, but you can always download another one if you see the new version is not compatible with your compose files. A least until a bug is fixed in Docker Compose or you can change your compose files if the change was not an introduced bug but an intended change.
And if you can make your compose file work again with older compose versions, you can report issues on GitHub in the compose repository, unless the change is shown in the release notes as intended.