Replicate docker-compose volume behavior in kubernetes
Empty dir is indeed for temporary data. If you need persistent data you have the choice between using a host path like in Docker, but if you have multiple nodes an a pod is scheduled for a different node the data will be missing.
A better solution is therefore to use a persistent volume. This must be provided by your infrastructure and is therefore specific to your environment.
See for details: https://kubernetes.io/docs/concepts/storage/volumes/
For the permission problem on Docker for Windows you might want to consider to use minikube instead.