Files
vault-para/400-archive/How to copy files into a named volume without an attached container · Issue_
T
2025-12-29 13:38:39 +08:00

18 lines
517 B
Plaintext

---
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
> ```