uname reports running/host kernel, we need the kernel contained in the image, that's the one that'll be running on a booted system. This same thing applies to the nvidia layer where I used the same method as I do here now.
78 lines
2.6 KiB
Text
78 lines
2.6 KiB
Text
FROM quay.io/fedora-ostree-desktops/kinoite:43 AS mpv-build
|
|
|
|
RUN dnf5 -y install --setopt install_weak_deps=false git-core meson g++ autoconf cmake automake libtool freetype-devel fribidi-devel nasm pipewire-devel wayland-devel wayland-protocols-devel libshaderc-devel libxkbcommon-devel vulkan-loader-devel compat-lua-devel libva-devel openssl-devel lcms2-devel
|
|
|
|
RUN mkdir /build && cd /build && git clone https://github.com/mpv-player/mpv-build.git
|
|
|
|
COPY ./mpv_options /build/mpv-build/mpv_options
|
|
|
|
RUN cd /build/mpv-build && ./rebuild -j$(nproc)
|
|
|
|
|
|
FROM quay.io/fedora-ostree-desktops/kinoite:43 AS scx-build
|
|
|
|
RUN dnf5 -y install --setopt install_weak_deps=false cargo git-core elfutils-libelf-devel clang rust-libseccomp-devel
|
|
|
|
RUN mkdir /build && cd /build && git clone https://github.com/sched-ext/scx
|
|
|
|
RUN mkdir -m 700 /var/roothome
|
|
|
|
RUN cd /build/scx && cargo build --release -p scx_lavd
|
|
|
|
|
|
FROM quay.io/fedora-ostree-desktops/kinoite:43
|
|
|
|
COPY --from=mpv-build /build/mpv-build/mpv/build/mpv /bin/mpv
|
|
|
|
COPY --from=scx-build /build/scx/target/release/scx_lavd /usr/bin/scx_lavd
|
|
|
|
COPY --from=scx-build /build/scx/services/scx.service /usr/lib/systemd/system/scx.service
|
|
|
|
# dnf configuration has to be in effect during build
|
|
COPY etc/dnf /etc/dnf
|
|
|
|
# Add rpmfusion repositories
|
|
RUN dnf5 -y install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
|
|
|
# Install ffmpeg (removing all the -free replacements is required)
|
|
RUN dnf5 -y install --allowerasing ffmpeg
|
|
|
|
# Install hardware codecs
|
|
RUN dnf5 -y install intel-media-driver
|
|
|
|
# Install gpu utilities
|
|
RUN dnf5 -y install igt-gpu-tools
|
|
|
|
# Install openh264
|
|
RUN dnf5 -y swap noopenh264 openh264 && dnf5 -y install mozilla-openh264
|
|
|
|
# Bulk of layered packages
|
|
RUN dnf5 -y install vim bat btop pv restic zstd nmap-ncat yt-dlp
|
|
|
|
# Set vim as default editor
|
|
RUN dnf5 -y swap nano-default-editor vim-default-editor
|
|
|
|
# Remove default color prompt (is replaced with a custom one)
|
|
RUN dnf5 -y remove bash-color-prompt
|
|
|
|
# Load the ntsync kernel module on boot
|
|
RUN dnf5 -y install ntsync-autoload
|
|
|
|
# Apply configuration
|
|
COPY etc /etc
|
|
COPY usr /usr
|
|
|
|
# fix-up kconfig path
|
|
RUN sed -i "/SCX_FLAGS=/ s/$/ --kconfig \/usr\/lib\/modules\/$(rpm -qa kernel | sed 's/kernel-//g')\/config/" /etc/default/scx
|
|
|
|
# Apply hardened firewall configuration
|
|
RUN firewall-offline-cmd --set-default-zone public
|
|
RUN firewall-offline-cmd --remove-service ssh
|
|
|
|
# Restrict permissions on quadlet directory
|
|
RUN chmod 700 /etc/containers/systemd
|
|
|
|
# https://github.com/ostreedev/ostree-rs-ext/issues/159
|
|
RUN ostree container commit
|
|
|
|
LABEL quay.expires-after=""
|