I have some confusing moments with docker-compose volumes (In docker windows server (container)). I wrote the next configuration
volumes:
- "C:/ProgramData/Docker/volumes/admin-stat-logs:C:/app/Logs"
and why it so necessary to write the full path to the volume?
if I write:
volumes:
- "admin-logs:C:/app/Logs"
it generates the error ERROR: Named volume "admin-logs:C:/app/Logs:rw" is used in service "admin-stat-table" but no declaration was found in the volumes section.
why does it happen?
UPDATE
let me show what I mean(I made wrong explonation). In an image, we have a short announcement from the official documentation.
I write the same in my case:
volumes:
- admin-logs:C:/app/Logs
I create volume before by the terminal. When I start docker-compose up I get the next error
ERROR: Named volume "admin-stat-logs:C:/app/Logs:rw" is used in service "admin-stat-table" but no declaration was found in the volumes section.
I made a mistake in the first case, it's a simple mount to a folder, sorry for my misunderstanding.
volumes:
- "C:/ProgramData/Docker/volumes/admin-stat-logs:C:/app/Logs"
