-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
32 lines (29 loc) · 943 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
registry_prefix := "ghcr.io/ultramarine-linux"
build variant:
buildah bud -t {{ registry_prefix }}/{{ variant }}-bootc {{ variant }}
build-vm image type="qcow2":
#!/usr/bin/env bash
set -euo pipefail
TARGET_IMAGE={{ image }}
if ! sudo podman image exists $TARGET_IMAGE ; then
echo "Ensuring image is on root storage"
sudo podman image scp $USER@localhost::$TARGET_IMAGE root@localhost::
fi
echo "Cleaning up previous build"
sudo rm -rf output || true
mkdir -p output
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v $(pwd)/image-builder.config.toml:/config.toml:ro \
-v $(pwd)/output:/output \
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
--type {{ type }} \
--rootfs btrfs \
--local \
$TARGET_IMAGE
sudo chown -R $USER:$USER output