TipsMake
Newest

SlimToolKit - A free tool for reducing Docker image size.

One of the things that frustrates people most about Docker images is their enormous size. Despite careful structuring of Dockerfiles and specific commands used to manage Docker, the size is unavoidable. Besides wasting disk space, the build process is incredibly time-consuming, and people spend a lot of time searching for unnecessary dependencies. Many people accepted this as unavoidable until they tried SlimToolKit.

 

Initially, some were quite skeptical because the tool's promise sounded too good to be true. It would significantly shrink your containers without touching the Dockerfile or disrupting the workflow. However, what happens after using this tool is an amazing discovery. You'll notice the benefits immediately and learn some lessons about container optimization.

What is SlimToolKit?

SlimToolKit is a tool to simplify and optimize your container development experience. It minifies Docker containers without changing the Dockerfile.

Docker image bloat

The invisible burden your containers carry.

SlimToolKit - A free tool for reducing Docker image size. Picture 1

 

Some people had just set up a fresh Linux Mint installation and, to test a few tools, they installed Docker and a couple of servers. Within just two days, after checking their container sizes, they were shocked to see how large they had become for a simple test. Nextcloud took up 1.46GB, and their local media server, Jellyfin, took up 1.55GB. Even Nginx, which is supposed to be extremely lightweight, occupied 161MB of space. This was inevitable due to the base image and leftover development tools, shell, and cache.

Tip : Terminal user interfaces like Lazydocker can provide visibility into Docker containers, services, logs, and resources.

However, after running the `docker history` command , it became clear the problem wasn't with the Dockerfiles. Unnecessary classes during runtime were bloating the image. These included libraries and packages installed just in case they were needed. For the first time, many realized how elusive container size can be. You can't assume any image is lightweight without checking its contents first.

It's clear why SlimToolKit can solve the problem. It can dynamically inspect and analyze containers, observing what they are using and what they are not using.

Discover SlimToolKit

How it works and what it can do.

SlimToolKit - A free tool for reducing Docker image size. Picture 2

 

Previously, to optimize containers, people tried multi-stage builds, package cleanup, and custom scripts; all of which were too prone to errors. SlimToolKit is different. It addressed this problem by monitoring the container while it's running, tracking the files it uses or accesses, and building an image that includes only those files.

It's also very transparent. The first time you run the slim build command, the CLI pauses at certain points, then prompts the user to enter new data. Everything it analyzes, including libraries and temporary files, is clearly visible. This is an approach that gives you control and is different from other optimization tools.

It removed unused shells, binaries, and packages. This not only reduced the image size but also improved security by reducing the attack surface.

Install and run SlimToolKit on Linux

SlimToolKit - A free tool for reducing Docker image size. Picture 3 SlimToolKit - A free tool for reducing Docker image size. Picture 4 SlimToolKit - A free tool for reducing Docker image size. Picture 5 SlimToolKit - A free tool for reducing Docker image size. Picture 6 SlimToolKit - A free tool for reducing Docker image size. Picture 7

Installing SlimToolKit is quite simple. First, you need to verify that Docker is installed and running, then download the SlimToolKit image. You can follow these steps:

1. Run the command below to check if you have Docker installed; you should get a result similar to Docker version 24.0.0, build xyz .

docker --version

2. If Docker is not already running, you can run the commands below to start it:

sudo systemctl start docker sudo systemctl enable docker

3. Download the official Docker image for SlimToolKit by running this command:

docker pull dslim/slim

SlimToolKit runs inside a container, so no additional installation is required. The first test involved running SlimToolKit in an Nginx container, which was approximately 161MB in size. To start the process, run the following command:

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock dslim/slim build --target nginx:latest --tag nginx-slim:latest

Throughout the process, you can see SlimToolKit inspecting the image. At one point, it created a temporary container and also detected HTTP endpoints. Ultimately, the results showed a 9.58-fold reduction, from 161MB to 16.8MB. This gave us confidence to continue shrinking other containers, and the results were equally impressive: Netdata decreased from 1.24GB to 295MB, and Uptime Kuma decreased from 448MB to 135MB.

Discover more
Jessica Tanner
Share by Jessica Tanner
Update 27 January 2026