$(uname -a) returning the same in docker host or any docker container

Solution 1:

Docker uses the host operating system kernel, there is no custom or additional kernel inside the container. All containers running on the machine are sharing this "host" kernel.

See for more information this question on SuperUser.

Solution 2:

  • cat /etc/os-release, or
  • cat /etc/issue for CentOS

See https://serverfault.com/a/805390/161568.