Microbadger

Microbadger is a great tool when you are looking at shipping your containers or images around. It will take into account everything that is going on in every single layer of a particular Docker image and give you the output of how much weight it has in terms of actual size or what amount of disk space it will take up.

This page is what you will be presented with when navigating to the Microbadger website, https://microbadger.com/.

You can search for images that are on Docker Hub to have Microbadger provide information about that image back to you, or you can load up a sample image set if you are looking to provide some sample sets or to see some more complex setups.

In this example, we are going to search for our cluster application image and select the latest tag. As you can see from the following screenshot, Docker Hub is automatically searched with results returned in real time as you type:

By default, it will always load the latest tag, but you also have the option of changing the tag you are viewing by selecting your desired tag from the Versions drop-down. This could be useful if you have, for example, a staging tag and are thinking of pushing this new image to your latest tag but want to see what impact it will have on the size of the image.

As you can see from the following screenshot, Microbadger presents information on how many layers your image contains:

As well as the size of each layer and the Dockerfile command executed during the image build, this is extremely useful when it comes to reducing the size of your images since you can see at which stage during the build image bloat is added.

Another great feature is that Microbadger gives you the option of embedding basic statistics about your images in your Git repository or Docker Hub; for example, the following screen shows the Docker Hub page for https://hub.docker.com/r/russmckendrick/cluster/:

As you can see, Microbadger is displaying the overall size of the image as well as the total number of layers the image is made up of.

The Microbadger service is still in beta and new functions are being added all the time. I recommend that you keep an eye on it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset