Dr.Knowitall
Dr.Knowitall

Reputation: 10498

Get kernel of docker container? I'm using docker-py

I'm building a platform that builds docker images. However to compile the containers correctly, I need to know the intended os type,... windows or linux as well as the possible kernel version that the containers were intended to be built for.

Is there anyway for me to use the docker sdk to get the target kernel for the container or image?

Upvotes: 0

Views: 35

Answers (1)

Yuankun
Yuankun

Reputation: 7813

The docker manifest inspect <IMAGE> command tells you the image's target architecture and OS. Links: https://docs.docker.com/edge/engine/reference/commandline/manifest/#manifest-annotate

For images running on Linux, the kernel should be version 3.10 or higher. Have no idea what's the requirements for images on Windows.

Upvotes: 1

Related Questions