The copy command copies files/folders between a container and the local filesystem and vice-versa.
docker cp foo.txt mycontainer:/foo.txt
docker cp mycontainer:/foo.txt foo.txt