Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check what OS a docker image depends on?

I want to extend my jenkins image to have docker installed so it can build a Dockerfile out of a project. I found a nice install script for docker but only for Ubuntu 64bit. What I need to know is if the parent images of my jenkins image base on Ubuntu 64bit so I can use this install script without any problems.

I used docker image inspect <imagename> already but it only yields hashes for former image versions it seems.

like image 573
xetra11 Avatar asked Sep 05 '17 11:09

xetra11


2 Answers

docker run <image-name> /etc/*release*

It will return the metadata about your image.

See example output here

like image 190
swapnil dwivedi Avatar answered Oct 25 '22 07:10

swapnil dwivedi


Following command worked docker run mysql cat /etc/os-release.

Output:

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
. . .
like image 21
Rahul Kodumuru Avatar answered Oct 25 '22 05:10

Rahul Kodumuru