A lightweight Docker-based build system for Debian/Ubuntu packages. It provides a clean, isolated environment for building packages and caches dependencies using Docker images.
-
Docker Desktop Settings: If you are using Docker Desktop, ensure that
/tmp(or your project workspace) is added toSettings -> Resources -> File Sharing. -
Local Python Environment: Install required libraries on your host machine:
pip install dulwich python-debian PyYAML
-
Local Infrastructure: Prepare folder for caching:
mkdir -p ~/.ccache -
Installation: Clone this repository and add its root folder to your
$PATHin.bashrcor.zshrc:git clone https://github.com/arthur-cpp/dckrbuild.git export PATH="path/to/dckrbuild:$PATH"
Before starting, check the config/ directory:
- dists.conf: List the target distributions (e.g.,
debian12,ubuntu24.04) you want to support. - psha.org.ru.yaml: Custom repository settings, prefixes, and GPG keys.
Initialize the base OS images for all distributions listed in config/dists.conf:
dckrbuild-host-init
This command creates build:dist images containing basic build tools (build-essential, ccache) and your custom repositories.
Go to your project directory (containing the debian/ folder) and prepare the dependency layers:
dckrbuild-proj-prepare
This script parses debian/control and creates a build-tmp:project-dist image for each target OS with all Build-Depends pre-installed.
Execute the multi-distro build from your project root:
dckrbuild-proj-build
- Requirements: Your project must have at least one Git tag (e.g.,
v1.0.0). Debian versioning requires the version string to start with a digit; the script automatically handles thevprefix. - Output: Ready-to-install
.debpackages and.changesfiles will be generated in the./resultfolder.
To clean up dangling Docker images and stopped containers:
./core/dckrbuild-clean