Docker linux versions

  docker

I am learning docker basics. I created a simple image

FROM alpine
RUN apk add --update redis
CMD ["redis-server"]

I started the container and logged in using

docker exec -it c57389dc94f5 sh

From the shell prompt, if I execute

more   /etc/alpine-release

I get 3.14.2.

If I execute

more /proc/version

I get

Linux version 5.4.0-84-generic ([email protected]) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021

Why am I getting Ubuntu when the image uses Alpine?

Source: Docker Questions

LEAVE A COMMENT