Docker - 复制文件到虚拟机
Docker - 复制文件到虚拟机虚拟机到主机docker cp <containerId>:/file/path/within/container /host/path/target主机到虚拟机#获得container IDdocker ps#获得详细iddocker inspect -f'{{.I
·
Docker - 复制文件到虚拟机
Max.Bai
2016-04-18
Docker - 复制文件到虚拟机
1 - 虚拟机到主机
docker cp <containerId>:/file/path/within/container /host/path/target
2 - 主机到虚拟机
#获得container ID
docker ps
#获得详细id
docker inspect -f '{{.Id}}' containnerID
#找到container 保存的目录
/var/lib/docker/devicemapper/mnt/4aeed454242xxxxxxxxxxxxxxxxxxxxxx/rootfs/home
cp file-of-path-on-host /var/lib/docker/devicemapper/mnt/4aeed454242xxxxxxxxxxxxxxxxxxxxxx/rootfs/path-on-vm
更多推荐
已为社区贡献1条内容
所有评论(0)