Docker Community Forums

Share and learn in the Docker community.

Getting Images operating system

docker

(Yanislisima) #1

Hi everyone,

Is there an universal way to getting Docker images’ operating system ?

I have thought of running a script that launch container with /bin/sh as entrypoint and getting informations from /etc/os-release. But I am no sure it is the right way.

Thanks


(Sam) #2

sorry, not quite sure what you are asking for.

universal way to getting Docker images’ operating system

what does that mean?


(Yanislisima) #3

I need to check operating system of all my running containers. But i cannot simply run exec commands on all of them because all entrypoints does not allow running other commands than main commands.

How can I get that list ?


(Sam) #4

are all the containers linux based?

if so, you can force a specific commands

docker exec container '/bin/sh'........ etc

(Yanislisima) #5

I will try and go back