Following is my code:
~ $ docker exec minikube ls /tmp
gvisor
h.876
h.951
hostpath-provisioner
hostpath_pv
nginx.tar
~ $ docker cp minikube:/tmp/nginx.tar /tmp/nginx.tar
Error: No such container:path: minikube:/tmp/nginx.tar
/tmp/nginx.tar exist in container but cannot cp, how to fix
2
Answers
I cannot fix docker cp err but I find another way to cp:
Exec
docker ps -a
get container Id and use it in your command.Then run
docker cp {CONTAINER_ID}:/tmp/nginx.tar ~
~
is for your home directory, dont copy to temp directory its protected one.