如何访问Docker的容器文件系统 [英] How to access docker's container file system

查看:457
本文介绍了如何访问Docker的容器文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要访问未运行的Docker容器的文件系统。最好的方法是什么?

I need to access the file system of a non-running docker's container. What is the best way to accomplish that?

谢谢,

推荐答案

docker export 命令是你所追求的。它将在标准输出中将容器文件系统的内容作为 tar 存档打印。

docker export <container_name> > my_container.tar

docker export --output="my_container.tar" <container_name>

这篇关于如何访问Docker的容器文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆