KDE Linux/Develop KDE Linux locally
Appearance
In order to speed up local builds, you can create a mkosi.local.conf file in the root of the repository with the following content:
[Content]
Environment=LOCALE_GEN="en_US.UTF-8 UTF-8" # replace with your locale`
Environment=MIRRORS_COUNTRY=us # replace with your country code`
Environment=PARALLEL_DOWNLOADS=50 # if your internet connection is fast
You need to be using the BTRFS storage driver for docker, otherwise this won't really work.
If your host filesystem uses BTRFS (like KDE Linux), you can just add the following to /etc/docker/daemon.json
{
"storage-driver": "btrfs"
}
official docker documentation explaining this
If you don't use BTRFS in your host machine, you can still create a BTRFS volume backed by a file like so:
systemctl stop docker.socket docker.service || true
fallocate -l 64G /store/docker.btrfs
mkfs.btrfs /store/docker.btrfs
[ -d /var/lib/docker ] || mkdir /var/lib/docker
mount /store/docker.btrfs /var/lib/docker
systemctl restart docker.socket docker.service
Then you can run:
./build_docker.sh --incremental