forked from bootcrew/arch-bootc
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJustfile
More file actions
44 lines (36 loc) · 1.34 KB
/
Copy pathJustfile
File metadata and controls
44 lines (36 loc) · 1.34 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
image_name := env("BUILD_IMAGE_NAME", "arch-base")
image_tag := env("BUILD_IMAGE_TAG", "latest")
base_dir := env("BUILD_BASE_DIR", ".")
filesystem := env("BUILD_FILESYSTEM", "ext4")
build-containerfile $image_name=image_name:
sudo podman build -t "${image_name}:latest" .
bootc *ARGS:
sudo podman run \
--rm --privileged --pid=host \
-it \
-v /sys/fs/selinux:/sys/fs/selinux \
-v /etc/containers:/etc/containers:Z \
-v /var/lib/containers:/var/lib/containers:Z \
-v /dev:/dev \
-e RUST_LOG=debug \
-v "{{base_dir}}:/data" \
--security-opt label=type:unconfined_t \
"{{image_name}}:{{image_tag}}" bootc {{ARGS}}
generate-bootable-image $base_dir=base_dir $filesystem=filesystem:
#!/usr/bin/env bash
if [ ! -e "${base_dir}/bootable.img" ] ; then
fallocate -l 20G "${base_dir}/bootable.img"
fi
just bootc install to-disk --composefs-backend --via-loopback /data/bootable.img --filesystem "${filesystem}" --wipe --bootloader systemd
generate-bootable-iso:
just --justfile Justfile-iso build-live
build-the-fucking-image:
sudo setenforce 0
just build-containerfile
just generate-bootable-image
sudo setenforce 1
build-the-fucking-iso:
sudo setenforce 0
just build-containerfile
just generate-bootable-iso
sudo setenforce 1