Getting Images operating system

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

sorry, not quite sure what you are asking for.

universal way to getting Docker images’ operating system

what does that mean?

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 ?

are all the containers linux based?

if so, you can force a specific commands

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

I will try and go back

Hi

I had the same question and tried executing this command but it didn’t work. Is there any other way of doing the same?

TIA.