Raptor is a modern, fast, and easy-to-use system for building disk images, bootable isos, containers and much more - all from a simple, Dockerfile-inspired syntax.
It uses systemd-nspawn for sandboxing when building or running containers.
Tip
📕 For more information, read the raptor book
Raptor uses a syntax similar to Dockerfile. Statements start with uppercase
keywords, and are terminated by end of line.
All lines starting with # are treated as comments:
# Start from a well-known docker image
FROM docker://debian:trixie
# Set the hostname
WRITE "example-host\n" /etc/hostname
# Create app directory
MKDIR -p /app/bin
# This copies "program" from the host to "/app/bin" inside the build target
COPY program /app/bin/programTip
📕 For more information, read the raptor book
Raptor builds layers, much in the same way as Docker.
However, this is where the similarities end! Raptor is able to run build processes on top of finished layers, to produce any kind of desired output.
The companion project raptor-builders can create:
- Debian Live Boot iso files
- Disk images for virtual (or physical) machines
After installing Raptor, create a file called base.rapt:
# Start from a docker iso
FROM docker://debian:trixie
# Set root password to "raptor"
RUN usermod -p "$1$GQf2tS9s$vu72NbrDtUcvvqnyAogrH0" root
# Update package sources, and install packages
RUN apt-get update
RUN apt-get install -qy systemd-sysv live-boot linux-image-amd64Then clone the raptor-builders project, which has the build container for making Debian Live Boot images:
git clone https://github.com/chrivers/raptor-builders.gitThen run the deblive container from raptor-builders, using the base(.rapt) we just made:
# Create cache dir (used in `-C` option)
mkdir /tmp/raptor-cache
# Run the `deblive` builder from `raptor-builders`
sudo raptor run \
'$rbuild.deblive' \
-L rbuild raptor-builders \
-C /tmp/raptor-cache \
-I base \
-O liveboot.isoAfter this step, the file liveboot.iso is ready to use. We can try it out with QEMU:
qemu-system-x86_64 -enable-kvm -cpu host -m 4G -cdrom liveboot.isoTip
📕 The whole process is described in much more detail in the book!.
The 📕 Raptor Book contains a lot more information, including a thorough description of all instructions, features, and a grammar for the language itself.
Raptor is Free Software, licensed under the GNU GPL-3.0.
The Raptor icon is derived from a Creative Commons Attribution-licensed icon.
