1.docker cp介绍
docker cp命令是用于在本地宿主机文件系统与docker容器(状态:运行中/停止)之间复制文件或文件夹
2.docker cp用法
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
[root@centos79 ~]# docker cp --helpUsage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATHCopy files/folders between a container and the local filesystemUse '-' as the source to read a tar archive from stdin
and extract it to a directory destination in a container.
Use '-' as the destination to stream a tar archive of a
container source to stdout.Aliases:docker container cp, docker cpOptions:-a, --archive Archive mode (copy all uid/gid information)-L, --follow-link Always follow symbol link in SRC_PATH-q, --quiet Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached
[root@ce