如何在不运行docker映像的情况下查看文件? [英] How to view files inside docker image without running it?
本文介绍了如何在不运行docker映像的情况下查看文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有时运行docker映像会失败,因此无法选择将ssh放入容器中.在那种情况下,我们如何看到容器中的内容?
Sometimes running the docker image fails so ssh’ing into the container is not an option. in that cases how do we see the content inside container?
存在一个问题,但错误地将其标记为重复.如何在不运行Docker映像的情况下浏览它?
There is a existing question but mistakenly marked as duplicate. how to browse docker image without running it?
推荐答案
回答我自己的问题.
您可以添加一些内容来覆盖Dockerfile中的入口点,并运行 ls
或 cat
命令以查看内部.
you can add something like to override the entry point in the Dockerfile and run ls
or cat
command to see inside.
ENTRYPOINT ls /etc/fluentd
这篇关于如何在不运行docker映像的情况下查看文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文