如何找出docker镜像中安装了哪个Linux
How to find out which Linux is installed inside docker image
参考: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