2024-04-12 20:34:52 +00:00
|
|
|
## 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
|
|
|
|
|
|
|
|
# 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.
|
2023-08-27 01:09:48 +00:00
|
|
|
ARG SOURCE_IMAGE="silverblue"
|
2024-03-03 17:40:37 +00:00
|
|
|
|
2024-04-12 20:34:52 +00:00
|
|
|
## 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"
|
|
|
|
|
|
|
|
## FEDORA_VERSION arg must be a version built by ublue: eg, 39 or 40
|
2024-03-03 17:40:37 +00:00
|
|
|
ARG FEDORA_VERSION="39"
|
|
|
|
|
2023-08-26 16:13:59 +00:00
|
|
|
|
|
|
|
### 2. SOURCE IMAGE
|
|
|
|
## this is a standard Containerfile FROM using the build ARGs above to select the right upstream image
|
2024-04-12 20:34:52 +00:00
|
|
|
FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${FEDORA_VERSION}
|
2023-08-26 16:13:59 +00:00
|
|
|
|
|
|
|
|
2024-04-15 05:27:36 +00:00
|
|
|
### 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.
|
|
|
|
|
|
|
|
COPY build.sh /tmp/build.sh
|
|
|
|
|
|
|
|
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
|