- 从宿主机拷文件到容器里面
容器名为testCentos,现在要将宿主机/home/test.txt 文件 拷贝到容器里面的/dockerHome/路径下面
docker cp /home/test.txt testCentos:/dockerHome/
- 从容器里面拷文件到宿主机
假设容器名为testCentos,要从容器里面拷贝的文件路为:/dockerHome/test.txt , 现在要将 test.txt 从容器里面拷到宿主机的/home/路径下面docker cp testCentos:/dockerHome/test.txt /home/
docker中文件迁移
最新推荐文章于 2023-01-30 10:28:02 发布