Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Odilhao committed Nov 22, 2024
0 parents commit 0f417f3
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [main]



env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/odilhao

jobs:
build-swaywm:
permissions:
packages: write
runs-on: ubuntu-24.04
steps:
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}
- uses: actions/checkout@v4
- name: Build container
run: podman build -t ${{ env.IMAGE_REGISTRY }}/bootc-server:${{ github.sha }} .
- name: Push Image Github SHA
run: podman push ${{ env.IMAGE_REGISTRY }}/bootc-server:${{ github.sha }}
- name: Tag Image as Latest
run: podman tag ${{ env.IMAGE_REGISTRY }}/bootc-server:${{ github.sha }} ${{ env.IMAGE_REGISTRY }}/bootc-server:latest
- name: Push Latest Image
run: podman push ${{ env.IMAGE_REGISTRY }}/bootc-server:latest
5 changes: 5 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM quay.io/fedora/fedora-bootc:41
LABEL org.opencontainers.image.source="https://github.com/Odilhao/bootc-server"


RUN dnf install vim -y && dnf clean all
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SHELL := /bin/bash

IMAGE_NAME=bootc-server

build:
sudo podman build -t $(IMAGE_NAME) -f Containerfile

anaconda-iso:
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v ./output:/output \
-v ./config.toml:/config.toml:ro \
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
--type anaconda-iso \
--rootfs btrfs \
ghcr.io/odilhao/bootc-server:latest
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Repo to build the demo for DOD BSB.
24 changes: 24 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[customizations.installer.kickstart]
contents = """
text --non-interactive
zerombr
network --bootproto=dhcp --device=link --activate --onboot=on

clearpart --all --initlabel
part btrfs.boot --fstype=btrfs --size=1024
part btrfs.main --fstype=btrfs --encrypted --grow --fsoptions="compress=zstd:1,space_cache=v2"

btrfs /boot --label=fedora-boot btrfs.boot
btrfs none --label=fedora-btrfs btrfs.main
btrfs / --subvol --name=root fedora-btrfs
btrfs /var/home --subvol --name=home fedora-btrfs
ostreecontainer --url docker pull ghcr.io/odilhao/bootc-sway:latest

firewall --disabled
services --enabled=sshd

# Only inject a SSH key for root
rootpw --iscrypted locked
sshkey --username root "<your key here>"

"""

0 comments on commit 0f417f3

Please sign in to comment.