AAtsushi's Blog
Infrastructure

How to Check the Base Image of a Docker Container

→ 日本語版を読む

I was wondering what OS a container was using, so I casually entered the Docker container and ran uname -r.

The host OS was displayed, which made me think "huh?" — but it made sense once I remembered it's a container.

For Debian-based systems, you can check the base image by looking at /etc/os-release.

For RedHat-based systems, check /etc/[redhat](<https://d.hatena.ne.jp/keyword/redhat>)-release.