docker 从容器中向主机拷贝数据:

sudo docker cp <containerId>:/file/path/within/container /host/path/target  

/file/path/within/container : 容器里面的目录

/host/path/target : 主机目录

sudo docker cp 88fc08c48349:/opt/apache-tomcat-8.0.41/logs /opt/logs/

docker 容器和宿主机相互拷贝数据

-----------------------------华丽分割线--------------------------------

从主机复制到容器:sudo docker cp host_path containerID:container_path

docker 容器和宿主机相互拷贝数据


转载于:https://blog.51cto.com/xiaok007/1909202

相关文章:

  • 2021-04-22
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2020-11-08
  • 2022-02-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2021-08-01
  • 2021-08-24
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案