Files
kde-linux/build_docker.sh
Harald Sitter ad4d0a9531 make sure we run docker builds on btrfs
with overlay2 things can easily explode because mkosi will itself also
overlay through bwrap
2024-08-24 16:54:05 +02:00

26 lines
732 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
# Build inside docker
set -ex
if ! docker info | grep 'Storage Driver: btrfs'; then
echo "You should run this on a btrfs'd docker instance. \
The btrfs can be a local file mounted into place at /var/lib/docker. \
Other docker backends will perform poorly if at all!"
exit 1
fi
docker run \
--privileged \
--env CI_PROJECT_DIR=/workspace \
--volume "$(pwd):/workspace" \
--volume "$(pwd)/pacman-cache:/var/cache/pacman/pkg" \
--volume "/dev:/dev" \
--workdir /workspace \
--rm=true \
archlinux:latest \
/workspace/in_docker.sh "$@"