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

Crossfit Open WOD 18.4

Crossfit Open WOD 18.3

Crossfit Open WOD 18.2

Crossfit Open WOD 18.1

Match only your own email in Evolution filters

Gronkh ist jetzt ein Rundfunksender...

Crossfit Regionals 2018 in Berlin

Crossfit Open 2018

Qutebrowser userscript for TT-RSS

Aufbau eines Hackintosh