Linux – Which OS is running in the Docker container

dockerlinuxoperating system

Most of the time, using one of these two, I can tell which OS is running in my Docker container (alpine, centOS, etc)

But this time, I can't tell:

bash-4.2$ uname -a       
Linux 6fe5c6d1451c 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

bash-4.2$ more /etc/issue
\S
Kernel \r on an \m

Any way to get a text version of the OS it is running ?

Best Answer

I like to use Screenfetch. You might want to try that.

If you look into the code you can see how it determines the distribution:

  • lsb_release -sirc
  • cat /etc/os-release

And to cover CentOS too:

  • cat /etc/issue