Docker - 将文件从容器复制到主机 [英] Docker - copy file from container to host
本文介绍了Docker - 将文件从容器复制到主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以吗?
解决方案
为了将文件从容器复制到主机,可以使用命令
docker cp< containerId>:/ file / path / within / container / host / path / target
I'm thinking of using docker to build my dependencies on a CI server, to that I don't have to install all the runtimes and libraries on the agents themselves. To achieve this I would need to copy the build artefacts that are built inside the container back into the host.
Is that possible?
解决方案
In order to copy a file from a container to the host, you can use the command
docker cp <containerId>:/file/path/within/container /host/path/target
这篇关于Docker - 将文件从容器复制到主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文