Mysql container fails on local volume (docker on windows 10)

We have an issue where mysql fails as soon as we try to use a local volume to store persistent data (docker-compose file below). It comes up with a long list of errors:

[Warning] [MY-012579] [InnoDB] fallocate(17, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22

We have tried already the option: "command: “–innodb_use_native_aio=0” as this was suggested elsewhere. Without the local volume the mysql container works flawless. Would appreciate any hints.

mysql:
image: mysql/mysql-server:latest
container_name: mysql
command: “–innodb_use_native_aio=0”
ports:
- 3306:3306
volumes:
- “/C/Users/reparaturo/chatbot/mysql:/var/lib/mysql”

Use a named volume for persistent data, don’t store db data in the Windows file system. For what reason do you want these files and folders in c:?

Thank you - the named volume resolved the issue.
The reason for local and persistend storage was to find a way to backup the data - but this is another story…

That’s what I was suspecting. Don’t expect that you get a reliable backup if you copy the content of /var/lib/mysql. If your database is not too big the best way is to use mysqldump.