Docker - CP command (COPY|ADD)

> Virtualization - (Virtual Machine|Container) > Docker

1 - About

Copy files/folders between a container and the local filesystem and vice-versa.

Advertising

3 - Example

  • From local system to container
docker cp foo.txt mycontainer:/foo.txt
  • From container to local system
docker cp mycontainer:/foo.txt foo.txt

4 - Documentation / Reference