This commit is contained in:
Jorge O. Castro 2024-12-15 02:19:32 +00:00 committed by GitHub
commit 042480913f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 90 deletions

View file

@ -1,59 +1,25 @@
## 1. BUILD ARGS FROM ghcr.io/ublue-os/base-main:latest
# 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
# SOURCE_IMAGE arg can be anything from ublue upstream which matches your desired version: ## Nvidia users use this instead
# See list here: https://github.com/orgs/ublue-os/packages?repo_name=main # FROM ghcr.io/ublue-os/base-nvidia:latest
# - "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"
### 2. SOURCE IMAGE ## Install a Desktop
## this is a standard Containerfile FROM using the build ARGs above to select the right upstream image # Use `dnf5 group list` to see possible group packages to install, or choose them individually
FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${SOURCE_TAG}
RUN dnf5 group install kde-desktop kde-apps
### 3. MODIFICATIONS ## Install applications
## make modifications desired in your image and install packages by modifying the build.sh script # Anything in Fedora
## the following RUN directive does all the things required to run "build.sh" as recommended.
COPY build.sh /tmp/build.sh RUN dnf5 install vlc
RUN mkdir -p /var/lib/alternatives && \ ## Add COPRs
/tmp/build.sh && \ # RUN dnf copr enable (copr-author/name)
ostree container commit # RUN dnf5 install thing-from-copr
## NOTES:
# - /var/lib/alternatives is required to prevent failure with some RPM installs ## Manage services
# - All RUN commands must end with ostree container commit # systemctl enable foo.service
# see: https://coreos.github.io/rpm-ostree/container/#using-ostree-container-commit
## Final command
RUN bootc container lint

View file

@ -2,15 +2,7 @@
# Purpose # Purpose
This repository is meant to be a template for building your own custom Universal Blue image. This template is the recommended way to make customizations to any image published by the Universal Blue Project: This repository is meant to be a template for building your own custom Universal Blue image.
- [Aurora](https://getaurora.dev/)
- [Bazzite](https://bazzite.gg/)
- [Bluefin](https://projectbluefin.io/)
- [uCore](https://projectucore.io/)
- [main](https://github.com/ublue-os/main/)
- [hwe](https://github.com/ublue-os/hwe/)
This template includes a Containerfile and a Github workflow for building the container image. As soon as the workflow is enabled in your repository, it will build the container image and push it to the Github Container Registry.
# Prerequisites # Prerequisites
@ -19,8 +11,8 @@ Working knowledge in the following topics:
- Containers - Containers
- https://www.youtube.com/watch?v=SnSH8Ht3MIc - https://www.youtube.com/watch?v=SnSH8Ht3MIc
- https://www.mankier.com/5/Containerfile - https://www.mankier.com/5/Containerfile
- rpm-ostree - bootc
- https://coreos.github.io/rpm-ostree/container/ - https://containers.github.io/bootc/
- Fedora Silverblue (and other Fedora Atomic variants) - Fedora Silverblue (and other Fedora Atomic variants)
- https://docs.fedoraproject.org/en-US/fedora-silverblue/ - https://docs.fedoraproject.org/en-US/fedora-silverblue/
- Github Workflows - Github Workflows
@ -34,10 +26,19 @@ Select `Use this Template` and create a new repository from it. To enable the wo
## Containerfile ## Containerfile
This file defines the operations used to customize the selected image. It contains examples of possible modifications, including how to: The top line is the base image you want to start FROM. Any valid image can be a starting point, examples include:
- change the upstream from which the custom image is derived
- add additional RPM packages - `FROM ghcr.io/ublue-os/bazzite:latest`
- add binaries as a layer from other images - `FROM ghcr.io/ublue-os/bluefin:stable`
- `FROM ghcr.io/ublue-os/aurora-dx:stable`
## "Empty" base images
These contain a base system WITHOUT a pre-existing desktop. This is recommended for a more bottom up approach or if you want to to use a different desktop environment than is currently available:
- `FROM ghcr.io/ublue-os/base-main:latest`
Use `base-nvidia:latest` if you need the Nvidia drivers. You can also lock to a specific version like `base-nvidia:41`, etc.
## Workflows ## Workflows

View file

@ -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