如何找出docker镜像中安装了哪个Linux

如何找出docker镜像中安装了哪个Linux How to find out which Linux is installed inside docker image 参考:https://stackoverflow.com/questions/63785595/how-to-find-out-w

如何找出docker镜像中安装了哪个Linux

How to find out which Linux is installed inside docker image

参考:https://stackoverflow.com/questions/63785595/how-to-find-out-which-linux-is-installed-inside-docker-image/67493590#67493590

参考:https://www.nuomiphp.com/a/stackoverflow/zh/61b1f572e601104c3628f706.html

有一些方法,但是看起来都不好

1.可以单纯运行容器

举例

docker run --rm -it --entrypoint /bin/sh auth-service:1.1

进入容器后执行

1.cat /etc/*-release


2.lsb_release -sirc或lsb_release -a


3.Cent 操作系统:cat /etc/issue

LICENSED UNDER CC BY-NC-SA 4.0
评论