-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (30 loc) · 837 Bytes
/
Makefile
File metadata and controls
34 lines (30 loc) · 837 Bytes
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
PODMAN = sudo podman
IMAGE_NAME = almalinux-bootc
VERSION_MAJOR = 10
PLATFORM = linux/amd64
LABELS ?=
.ONESHELL:
.PHONY: all
all: rechunk
.PHONY: image
image:
$(PODMAN) build \
--platform=$(PLATFORM) \
--security-opt=label=disable \
--cap-add=all \
--device /dev/fuse \
--iidfile /tmp/image-id \
$(LABELS) \
-t $(IMAGE_NAME) \
-f $(VERSION_MAJOR)/Containerfile \
.
rechunk:
$(PODMAN) run \
--rm --privileged \
--security-opt=label=disable \
-v /var/lib/containers:/var/lib/containers:z \
quay.io/centos-bootc/centos-bootc:stream10 \
/usr/libexec/bootc-base-imagectl rechunk \
localhost/$(IMAGE_NAME):latest localhost/rechunked-$(IMAGE_NAME):latest && \
$(PODMAN) tag localhost/rechunked-$(IMAGE_NAME):latest localhost/$(IMAGE_NAME):latest && \
$(PODMAN) rmi localhost/rechunked-$(IMAGE_NAME):latest