![Docker inspect layer size](https://kumkoniak.com/80.jpg)
![docker inspect layer size docker inspect layer size](https://i2.wp.com/www.cloudsavvyit.com/p/uploads/2021/06/e8e99921.png)
Now let's try winspector and inspect a random Docker image. docker run -rm stefanscherer/winspector microsoft/iis The Docker image stefanscherer/winspector is a multiarch Docker image and Docker will pull the correct OS specific image for you automatically. If you have a Linux Docker engine running, just use the exact same command as on Windows. I'll try to move it to nanoserver to reduce download size for Windows 10 users. docker run -rm stefanscherer/winspector microsoft/iisĪt the moment the Docker image depends on the windowsservercore base image. If you have Docker running with Windows containers, use this command to run the tool with any given image name and an optional tag. It tries to reconstruct the Dockerfile commands that have been used to build the image. So you get an idea how small your Windows application image really is and what other users have to download provided that they already have the base image. The "application size" without the Windows base layers.This is useful to when you try to optimize your image size.
![docker inspect layer size docker inspect layer size](https://buildvirtual.net/wp-content/uploads/2020/04/Screenshot-2020-04-02-at-10.50.26-560x311.png)
So you know whether a random Windows image uses the up to date Windows base image or not.
![docker inspect layer size docker inspect layer size](https://res.cloudinary.com/practicaldev/image/fetch/s--LS0v8u11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/muisiudqii7i9vgpjmgx.png)
- Which Windows base image the given image depends on.
- The number of layers down to the Windows base image.
- The creation date of the image and the Docker version and Windows version used at build time.
-
With this tool you can inspect any Windows Docker images on the Docker Hub. I've enhanced it and created a tool called winspector which is available as Docker image stefanscherer/winspector for Windows and Linux. I found an inspector tool written in Python that might be useful for that task. Unfortunately not all support Windows images at the moment. There are several services like imagelayers.io, microbadger, shields.io and others which provide badges and online views for existing Docker images at Docker Hub. Is there a way to look into container images without downloading them? But how do you know if your underlying Docker image you use in the FROM line of your Dockerfile also uses the correct version of the Windows base image? In my previous blog post I showed you how to get Windows Updates into your container images.