How to copy files from docker container to host?

Pavel Klindziuk
Dandelion Tutorials
May 13, 2020
1. Get container name or short container id:
docker ps
2. Get into container and find path to file/folder:
docker exec -t -i <container-name/id> /bin/bash
3. Copy single specific file:
docker cp <container-name/id>:<path-to-file> <place-to-copy>
4. Copy specific folder:
docker cp <container-name/id>:<path-to-folder>/. <place-to-copy>

--

--