Docker

docker cp

SafeCopy to/from container

docker cp <container>:<path> <localpath>

Copies files between a container and the host; grab logs/config.

Examples

  • docker cp web:/etc/nginx/nginx.conf .Pull out a config

Syntax

docker cp <container>:<src> <dest> (works both directions)

Before you run it

Copy only.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store