--- page-title: "How to copy files into a named volume without an attached container? · Issue #25245 · moby/moby" url: https://github.com/moby/moby/issues/25245 date: "2023-06-19 15:32:50" --- > ``` > docker run -d --rm --name dummy -v myvolume:/root alpine tail -f /dev/null > docker cp c:\myfolder\myfile.txt dummy:/root/myfile.txt > docker stop dummy > ``` > > You can also copy the other way (from the volume to the local file system). > > ``` > docker cp dummy:/root/myfile.txt c:\myfolder\myfile.txt > ```