From 095621b7ab4aa23a5efbcaab9b1f9fdbbeb07862 Mon Sep 17 00:00:00 2001 From: "Jorge O. Castro" Date: Mon, 2 Dec 2024 22:41:11 -0500 Subject: [PATCH] feat: switch to bootc/dnf5 --- Containerfile | 65 +++++++++++---------------------------------------- build.sh | 23 ------------------ 2 files changed, 13 insertions(+), 75 deletions(-) delete mode 100755 build.sh diff --git a/Containerfile b/Containerfile index 5d08ad5..cb1ddb4 100644 --- a/Containerfile +++ b/Containerfile @@ -1,59 +1,20 @@ -## 1. BUILD ARGS -# These allow changing the produced image by passing different build args to adjust -# the source from which your image is built. -# Build args can be provided on the commandline when building locally with: -# podman build -f Containerfile --build-arg FEDORA_VERSION=40 -t local-image +FROM ghcr.io/ublue-os/base-main:latest -# SOURCE_IMAGE arg can be anything from ublue upstream which matches your desired version: -# See list here: https://github.com/orgs/ublue-os/packages?repo_name=main -# - "silverblue" -# - "kinoite" -# - "sericea" -# - "onyx" -# - "lazurite" -# - "vauxite" -# - "base" -# -# "aurora", "bazzite", "bluefin" or "ucore" may also be used but have different suffixes. -ARG SOURCE_IMAGE="silverblue" - -## SOURCE_SUFFIX arg should include a hyphen and the appropriate suffix name -# These examples all work for silverblue/kinoite/sericea/onyx/lazurite/vauxite/base -# - "-main" -# - "-nvidia" -# - "-asus" -# - "-asus-nvidia" -# - "-surface" -# - "-surface-nvidia" -# -# aurora, bazzite and bluefin each have unique suffixes. Please check the specific image. -# ucore has the following possible suffixes -# - stable -# - stable-nvidia -# - stable-zfs -# - stable-nvidia-zfs -# - (and the above with testing rather than stable) -ARG SOURCE_SUFFIX="-main" - -## SOURCE_TAG arg must be a version built for the specific image: eg, 39, 40, gts, latest -ARG SOURCE_TAG="latest" +## Nvidia users use this instead +# FROM ghcr.io/ublue-os/base-nvidia:latest -### 2. SOURCE IMAGE -## this is a standard Containerfile FROM using the build ARGs above to select the right upstream image -FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${SOURCE_TAG} +## Install a Desktop +RUN dnf5 group install kde-desktop kde-apps -### 3. MODIFICATIONS -## make modifications desired in your image and install packages by modifying the build.sh script -## the following RUN directive does all the things required to run "build.sh" as recommended. +## Install applications +# Anything in Fedora -COPY build.sh /tmp/build.sh +RUN dnf5 install vlc -RUN mkdir -p /var/lib/alternatives && \ - /tmp/build.sh && \ - ostree container commit -## NOTES: -# - /var/lib/alternatives is required to prevent failure with some RPM installs -# - All RUN commands must end with ostree container commit -# see: https://coreos.github.io/rpm-ostree/container/#using-ostree-container-commit +## Add COPRs +# RUN dnf copr enable (copr-author/name) + +## Manage services +# systemctl enable foo.service \ No newline at end of file diff --git a/build.sh b/build.sh deleted file mode 100755 index 0ca1678..0000000 --- a/build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -ouex pipefail - -RELEASE="$(rpm -E %fedora)" - - -### Install packages - -# Packages can be installed from any enabled yum repo on the image. -# RPMfusion repos are available by default in ublue main images -# List of rpmfusion packages can be found here: -# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1 - -# this installs a package from fedora repos -rpm-ostree install screen - -# this would install a package from rpmfusion -# rpm-ostree install vlc - -#### Example for enabling a System Unit File - -systemctl enable podman.socket