TOOL » VIRTUAL_ENVIRONMENT » DOCKER

Cp

Usage

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

shell
docker cp OPTIONS SOURCE CONTAINER:DEST
docker cp OPTIONS CONTAINER:SOURCE DEST
OptionDescription
-a --archiveArchive mode (copy all uid/gid information).
-L --follow-linkAlways follow symbol link in SOURCE.

Example

Copy file from local to container.

shell
docker cp requirements.txt container:/root/requirements.txt

Copy directory from container to local.

shell
docker cp container:/root/wheelhouse wheelhouse