Skip to content
masterclass Buddy

Docker · Command

docker cp

Copies files and directories between a container and the local filesystem. It works with running or stopped containers and supports tar streams through standard input or output.

Last updated

Syntax

docker container cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • docker cp
  • docker container
  • docker exec
  • docker compose cp

Source: docker container cp. Checked 2026-11-03.