How to Copy Files From Docker Ubuntu Container to Windows Host
I can’t figure out how to copy files from a docker ubuntu container to a windows host, or vice versa.
My host is Windows 10. When I start Docker, I run the Ubuntu image using
docker run -it ubuntu bash
The documentation I’ve read says that the way the transfer files is with
docker cp, but apparently that command doesn’t exist in this ubuntu image, i.e.,
bash: docker: command not found.
This must be a dumb oversight on my part. Can someone please give me a little help?
One Solution collect form web for “How to Copy Files From Docker Ubuntu Container to Windows Host”
You need to run docker cp command on host machine.
The command template is:
docker cp <containerId>:<src_path_inside_container> <target_host_path>