This host runs Ubuntu 24.04. Prove which parts an Alpine container shares with it and which parts it does not.
Start with the kernel, on the host and in a container:
sh
uname -r
docker run --rm alpine:3.20 uname -rNow compare the operating system files:
sh
grep PRETTY /etc/os-release
docker run --rm alpine:3.20 grep PRETTY /etc/os-releaseAnd the hostname:
sh
hostname
docker run --rm alpine:3.20 hostnameSave the container's full release file on the host, then read it:
sh
docker run --rm alpine:3.20 cat /etc/os-release > ~/alpine-os-release.txt
cat ~/alpine-os-release.txtSame kernel, different filesystem: that is the difference between a container and a VM.