Original topic: No volume mounting after Docker Desktop update
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:
volumes:
db_root:
driver: local
driver_opts:
type: none
device: $STATE_ROOT/database
o: bind
If I replace the environment variable $STATE_ROOT
with the actual path, everything works as expected:
volumes:
db_root:
driver: local
driver_opts:
type: none
device: /Users/fred/projects/example/state/database
o: bind
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).