my-ostree-OS/Dockerfile
Anders da Silva Rytter Hansen 85f924ca20
Some checks failed
os / build (push) Failing after 24m44s
mkdir af tmp mappe
2026-05-14 12:33:34 -03:00

114 lines
4.9 KiB
Docker

FROM quay.io/almalinuxorg/atomic-desktop-kde:10
ARG KERNEL=kernel-cachyos
ENV KERNEL=${KERNEL}
RUN echo 'omit_drivers+=" nouveau "' | tee /etc/dracut.conf.d/blacklist-nouveau.conf
COPY bin/set_next_version.sh /tmp
RUN /tmp/set_next_version.sh
COPY repo/*.repo /etc/yum.repos.d/
RUN dnf config-manager --add-repo=https://negativo17.org/repos/epel-nvidia.repo -y
RUN dnf install --nogpgcheck -y https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
RUN dnf config-manager --add-repo https://copr.fedorainfracloud.org/coprs/andersrh/sonicDE/repo/rhel+epel-10/andersrh-sonicDE-rhel+epel-10.repo -y
RUN dnf config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/xlibre/xlibre-xserver/repo/rhel+epel-10/group_xlibre-xlibre-xserver-rhel+epel-10.repo -y
# This may be necessary for the speakers and internal microphone
RUN dnf install -y alsa-sof-firmware
RUN dnf install sonic-workspace-x11 sonic-win sonic-interface-libraries sonic-workspace --allowerasing -y
RUN dnf install -y fish distrobox nvtop intel-media-driver libva-intel-driver htop
RUN dnf install -y https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.2.0/appimagelauncher-2.2.0-travis995.0f91801.x86_64.rpm
# Enable CachyOS repositories
RUN dnf copr enable bieszczaders/kernel-cachyos -y
# Enable CachyOS addons EL10 fork repo
RUN dnf copr enable andersrh/kernel-cachyos-addons-el10 -y
RUN dnf install -y ${KERNEL} ${KERNEL}-devel-matched
RUN dnf remove -y kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra kernel-tools kernel-tools-libs
# Install Negativo17 Nvidia driver, waydroid and SELinux rules
# Dette kræver at du kører build med --privileged eller --cap-add SYS_ADMIN
# eller bruger Buildah's RUN --mount feature
RUN dnf install -y dkms-nvidia nvidia-driver nvidia-persistenced opencl-filesystem libva-nvidia-driver waydroid policycoreutils && \
mkdir -p /tmp/selinux-tmp && \
mount -t tmpfs tmpfs /tmp/selinux-tmp && \
mkdir -p /tmp/selinux-tmp/etc/selinux/targeted && \
cp -r /etc/selinux/targeted/* /tmp/selinux-tmp/etc/selinux/targeted/ && \
semodule -p /tmp/selinux-tmp/etc/selinux -B && \
semodule -p /tmp/selinux-tmp/etc/selinux -i /usr/share/selinux/targeted/waydroid.pp && \
semodule -p /tmp/selinux-tmp/etc/selinux -i /usr/share/selinux/packages/targeted/nvidia-driver.pp.bz2 && \
cp -a /tmp/selinux-tmp/etc/selinux/targeted/* /etc/selinux/targeted/ && \
umount /tmp/selinux-tmp
RUN dkms install nvidia/$(ls /usr/src/ | grep nvidia- | cut -d- -f2-) -k $(rpm -q --queryformat "%{VERSION}-%{RELEASE}.%{ARCH}\n" ${KERNEL})
RUN dnf install -y scx-scheds
# Remove plocate to avoid updatedb going crazy with scanning the file system once a day
RUN dnf remove -y plocate
# Install Mullvad VPN client
RUN rpm -Uvh --nodeps https://mullvad.net/da/download/app/rpm/latest
# Install libheif-freeworld to show thumbnails in Dolphin
RUN dnf install libheif-freeworld -y
# Install proprietary codecs
RUN dnf swap libavcodec-free libavcodec-freeworld --allowerasing -y
# Install HPLIP for HP printer support
RUN dnf install hplip -y
RUN dnf -y install gwenview kalk okular
RUN dnf -y install chromium
# Delete default Chromium config so it can be replaced by my own
RUN rm -f /etc/chromium/chromium.conf
# Add rule to SELinux allowing modules to be loaded into custom kernel
RUN setsebool -P domain_kernel_load_modules on
RUN dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
RUN dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
RUN dnf install firefox thunderbird -y
RUN rm -f /usr/lib64/libopenh264.so.2.4.1 /usr/lib64/libopenh264.so.7
RUN rpm -Uvh --nodeps https://codecs.fedoraproject.org/openh264/42/x86_64/Packages/o/openh264-2.5.1-1.fc42.x86_64.rpm https://codecs.fedoraproject.org/openh264/42/x86_64/Packages/m/mozilla-openh264-2.5.1-1.fc42.x86_64.rpm
RUN dnf install xorg-x11-xinit xkbcomp xinput xlibre-xserver-Xorg xlibre-xf86-input-libinput cage weston redshift -y
RUN dnf install ananicy-cpp cachyos-ananicy-rules cachyos-settings -y \
&& systemctl enable ananicy-cpp
# Install VLC
RUN dnf install vlc vlc-plugins-freeworld vlc-plugin-pipewire -y
# Install Brave browser
RUN dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo -y
RUN dnf install brave-browser -y
RUN dnf install rclone -y
RUN dnf install https://github.com/trapexit/mergerfs/releases/download/2.41.1/mergerfs-2.41.1-1.el10.x86_64.rpm -y
RUN systemctl enable docker
RUN systemctl enable scx_loader
COPY etc /etc
COPY usr /usr
RUN systemctl enable waydroid-choose-intel-gpu.service
# Disable SELinux
RUN sed -i "s/^SELINUX=.*$/SELINUX=permissive/g" /etc/sysconfig/selinux && sed -i "s/^SELINUX=.*$/SELINUX=permissive/g" /etc/selinux/config
RUN rm -rf /tmp/* /var/* && mkdir -p /var/tmp && chmod -R 1777 /var/tmp