If you set the above in docker-compose.yml, folder C appears directly under folder A on the host side, but folder C is empty (there is a file in folder C on the container side).
Why is host side folder C empty?
services:
app:
images —php
volumes:
- Folder A: Folder B
- volumeC —Folder C
volumes:
volumeC:
On the other hand, self-created volumes do not bind mount, so they are used to perpetuate data in an area called Docker Volume.In this case, there is no link to the local file system, so the file is not stored in folder C, nor is there a link.
© 2025 OneMinuteCode. All rights reserved.