What is the use-case?
Would it not be possible with a Docker volume? Use volumes | Docker Documentation