In the Docker Compose example for WordPress, the Ycode listing [1] says:
volumes:
- db_data:/var/lib/mysql
What is exact meaning here? To compare, while using the Docker client, you can map volume to a host folder [2]:
-v /src/webapp:/webapp
This command mounts the host directory,
/src/webapp
, into the container at/webapp
.
[1] https://docs.docker.com/compose/wordpress/#define-the-project
[2] https://docs.docker.com/engine/tutorials/dockervolumes/#locate-a-volume