Copy files from container to host.
Section: Containers
Copy files from a container
bash
bash
docker cp web:/var/log/nginx/access.log ./access.logExplanation
Good for extracting logs and generated artifacts.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Containers