docker cp 文件
时间: 2023-10-12 14:01:41 浏览: 148
Docker的cp命令用于在容器和主机之间复制文件或目录。基本语法为docker cp [源对象 [目标对象,其中源对象可以是容器中的文件或目录,目标对象可以是主机中的路径或者容器中的路径。如果目标路径不存在,它会自动创建目录。 [容器名称或ID]: [主机文件路径]
需要注意的是,如果目标路径已经存在,docker cp命令会覆盖文件内容。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [30-Docker-常用命令详解-docker cp](https://blog.csdn.net/IT_heima/article/details/127190847)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [docker cp 拷贝文件](https://blog.csdn.net/qq_21134059/article/details/121853154)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文