# Reference: Docker Volume Syntax ## Volumes in docker-compose.yml ### Named Volume ```yaml volumes: my-data: driver: local ``` ### Mount Volume in Service ```yaml services: app: volumes: - my-data:/app/data # Named volume - ./local:/host/path # Bind mount ``` ### Volume Options ```yaml volumes: data: driver: local driver_opts: type: none o: bind device: /host/path ``` ## CLI Commands - `docker volume create` - `docker volume ls` - `docker volume inspect` - `docker volume rm` - `docker volume prune`