Dockerfile to build qdirstat

Today I wanted to check how much diskspace I wasted in my home directory. On windows I’d use WinDirStat and on linux there is the alternative qdirstat. Unfortunately there is no pre-build binary for my distribution, so I decided to build from source. But I don’t want litter my system with Qt dependencies, so I decided to build it in a docker container. Here’s my Dockerfile:

First you have to create an image from this Dockerfile:

# copy the Dockerfile into a new directory and run the following command in a terminal in that directory
docker build -t moritanosuke/qdirstat .

Now you can start a container from this image to clone and build qdirstat:

# run the container
docker run --rm -it -v $(pwd):/usr/target moritanosuke/qdirstat

Now you should have the executable in the current directory. The owner will be root, but you should be able to run it on your local machine now - assuming that you have all dependencies to run Qt applications already installed. The container was removed right after it completed the build, so the only thing left to do is removing the image:

docker rmi moritanosuke/qdirstat

This is now my preferred way to build random open source projects without messing up my local machine. In earlier times I used full blown VMs with snapshots, but this is even faster.

Weitere Artikel

Google verwendet Daten aus unseren Smartphones

Sonnenaufgang und Sonnenuntergang

Dark Mode für Firefox und Thunderbird

Video Thumbnails unter Windows erstellen

Eindrücke aus Red Dead Redemption 2

Neuer Bluray Player: PS4

How to hardware reset the new Oura ring

Neuer Monitor: Dell S2716DG

Ein paar Bilder

Endlich da: Mein Oura Ring