microscaling / microbadger

What's inside your Docker containers?
Other
159 stars 18 forks source link

Add support for Mircosoft Windows Docker images #16

Open DieterReuter opened 7 years ago

DieterReuter commented 7 years ago

I just tried to analyse the Docker image microsoft/nanoserver to get an overview about the content layers and sizes, but I only got an error message.

microsoft/nanoserver not found on Docker Hub
We couldn’t find the image on Docker Hub. Let us know if you’d like support for a different image registry.

Right now it seems that these images are not supported by Microbadger. I know these images are not stored directly on the Docker Hub, they are stored in a linked repository. But we can easily search them through the Docker Hub, but a pull is only possible from a Windows machine. So I guess the registry API handles them differently.

$ docker search microsoft/nanoserver
NAME                   DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
microsoft/nanoserver   Windows Server 2016 Nano Server base OS im...   88
DieterReuter commented 7 years ago

In the meantime I did some research and I guess I know whats going wrong here. In case you'd like to implement it in Microbadger I'm sure I can give some help.

StefanScherer commented 7 years ago

The only change to retrieve some more Windows information is to do a similar request to the Docker Hub API, but with Accept header application/vnd.docker.distribution.manifest.v2+json, as I found out in

https://github.com/StefanScherer/winspector/blob/2fab6177f3de49b851f5a9c21151ef1f6c7bf545/winspector.py#L77