Skip to content

Commit

Permalink
Add bootc image for 10-kitten (#6)
Browse files Browse the repository at this point in the history
* Copy 9 to 10

* Rename 10 to 10-kitten

* Update fedora-bootc submodule

* Fix 10-kitten build
  • Loading branch information
imbev authored Dec 19, 2024
1 parent 6ac22e9 commit 9c1015e
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 1 deletion.
27 changes: 27 additions & 0 deletions 10-kitten/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM docker.io/library/almalinux:10-kitten as repos
FROM quay.io/centos-bootc/bootc-image-builder:latest as builder


COPY --from=repos /etc/dnf/vars /etc/dnf/vars

COPY 10-kitten /src
COPY fedora-bootc /src/fedora-bootc
WORKDIR /src

COPY --from=repos /etc/yum.repos.d/*.repo /src
COPY --from=repos /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-10 /etc/pki/rpm-gpg

RUN --mount=type=cache,target=/workdir \
--mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \
rpm-ostree compose image \
--image-config almalinux-bootc-config.json \
--cachedir=/workdir \
--format=ociarchive \
--initialize almalinux-bootc.yaml \
/buildcontext/out.ociarchive

FROM oci-archive:./out.ociarchive

RUN --mount=type=bind,from=builder,src=.,target=/var/tmp \
--mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \
rm /buildcontext/out.ociarchive
9 changes: 9 additions & 0 deletions 10-kitten/almalinux-bootc-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Labels": {
"containers.bootc": "1",
"bootc.diskimage-builder": "quay.io/centos-bootc/bootc-image-builder",
"redhat.id": "almalinux",
"redhat.version-id": "10.0"
},
"StopSignal": "SIGRTMIN+3"
}
25 changes: 25 additions & 0 deletions 10-kitten/almalinux-bootc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
releasever: 10

repos:
- baseos
- appstream

variables:
distro: "almalinux10"

packages:
#- almalinux-repos
- almalinux-kitten-repos

postprocess:
- |
#!/usr/bin/env bash
mkdir -p /usr/lib/bootc/install/
cat > /usr/lib/bootc/install/20-rhel.toml << EOF
[install]
root-fs-type = "xfs"
EOF
include:
- fedora-bootc/tier-1/kernel.yaml
- fedora-bootc/tier-1/manifest.yaml
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,22 @@

## Usage

It may be neccessary to run the following before building:

```sh
git submodule update --init --recursive
```

### AlmaLinux 9

```sh
podman build --security-opt=label=disable --cap-add=all \
--device /dev/fuse -t localhost/almalinux-9-bootc -f 9/Containerfile .
```

### AlmaLinux 10 Kitten

*WARNING: This release should not be used for production installations.*

podman build --security-opt=label=disable --cap-add=all \
--device /dev/fuse -t localhost/almalinux-10-kitten-bootc -f 10-kitten/Containerfile .
2 changes: 1 addition & 1 deletion fedora-bootc
Submodule fedora-bootc updated from 40df0e to 7b7c32

0 comments on commit 9c1015e

Please sign in to comment.