-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgo.sh
executable file
·54 lines (44 loc) · 1.25 KB
/
go.sh
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
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
set -eu
shopt -s inherit_errexit
build-verms() {
_oci --tag verms-os -f verms.Dockerfile
}
build-toolbox() {
_oci --tag toolbox -f toolbox.Dockerfile
}
push-verms() {
podman push --creds averms verms-os:latest ghcr.io/averms/verms-os:latest
}
build-qcow2() {
podman image scp localhost/verms-os:latest root@localhost::
_image ./qemu_config.toml \
--local --type qcow2 --rootfs xfs localhost/verms-os:latest
}
build-iso() {
podman image scp localhost/verms-os:latest root@localhost::
_image ./iso_config.toml \
--local --type anaconda-iso --rootfs xfs localhost/verms-os:latest
}
help() {
echo "$0 <task> [args]"
echo
compgen -A function | grep -v '^_' | cat -n
}
_oci() {
podman build --pull=always --build-arg MAJOR_VERSION=41 "$@"
}
_image() {
local config="$1"
shift
sudo podman run --pull=always --rm -it --privileged --security-opt label=disable \
-v rpmmd:/rpmmd \
-v osbuild:/store \
-v ./output:/output \
-v "${config}:/config.toml:ro" \
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
"$@"
}
TIMEFORMAT="Task completed in %3lR"
time "${@:-help}"