docker cp Explained
What docker cp does, with an example.
Published November 9, 2026
docker cp copies files or directories between a container and the local filesystem.
Key points
- Part of the standard Docker CLI used for building, running, and managing containers
Example
docker cp my-container:/app/log.txt ./log.txt