有什么办法可以列出正在运行的Docker容器中安装的所有依赖项或库? [英] Is there any way by which we can list out all the dependencies or libraries installed in running docker container?

查看:93
本文介绍了有什么办法可以列出正在运行的Docker容器中安装的所有依赖项或库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以列出正在运行的 docker容器中安装的所有依赖项或库?

Is there any way by which we can list out all the dependencies or libraries installed in running docker container?

推荐答案

不完全是

您可以检查容器映像的历史记录:这将使您了解从基本映像执行的各种操作(运行,复制,添加),以构建所述映像.

You can inspect the history of the image of a container: that will give you an idea of the various operations (RUN, COPY, ADD) done from a base image in order to build said image.

但是请不要忘记,容器可以从映像中运行,就像SCRATCH(无文件)+ 1个可执行文件(仅进行系统调用)一样简单.没有操作系统,没有bash,除了一个可执行文件之外什么都没有.
在这种情况下,没有要列出的依赖项或库.

But don't forget a container can be run from an image a simple as SCRATCH (no files) + 1 executable (making only system call). No OS, no bash, no nothing except that one executable.
In that case, there is no dependencies or libraries to list.

这篇关于有什么办法可以列出正在运行的Docker容器中安装的所有依赖项或库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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