1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-20 17:55:23 +02:00

docker-cp: add page (#5468)

This commit is contained in:
taryn 2021-03-19 08:48:21 -05:00 committed by GitHub
parent 941f245407
commit 2cf45c19cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
pages/common/docker-cp.md Normal file
View file

@ -0,0 +1,16 @@
# docker cp
> Copy files or directories between host and container filesystems.
> More information: <https://docs.docker.com/engine/reference/commandline/cp>.
- Copy a file or directory from the host to a container:
`docker cp {{path/to/file_or_directory_on_host}} {{container_name}}:{{path/to/file_or_directory_in_container}}`
- Copy a file or directory from a container to the host:
`docker cp {{container_name}}:{{path/to/file_or_directory_in_container}} {{path/to/file_or_directory_on_host}}`
- Copy a file or directory from the host to a container, following symlinks (copies the symlinked files directly, not the symlinks themselves):
`docker cp --follow-link {{path/to/symlink_on_host}} {{container_name}}:{{path/to/file_or_directory_in_container}}`