Files
silverblue-images/Containerfile-lenovo-16arh7h
T
Ben Radey ef6211c321 Revert "Updating desktop images to 44"
This reverts commit 7aeb946b6b.
2026-05-02 10:34:41 -04:00

35 lines
1.6 KiB
Plaintext

FROM ghcr.io/benradey/workstation-nvidia-base:latest
# Build nvidia akmod with no special arguments - defaults to open kernel driver for newer hardware
RUN mkdir -p /var/log/akmods /var/cache/akmods/nvidia /var/tmp && \
chmod 777 /var/tmp && \
/usr/sbin/akmods --force --kernels "$(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RUN dnf5 install -y \
dkms \
powertop \
python3-pyusb \
radeontop \
uhubctl \
waydroid \
xinput && \
dnf5 clean all
RUN git clone https://github.com/johnfanv2/LenovoLegionLinux.git && \
mkdir -p /usr/src/LenovoLegionLinux-1.0.0 && \
cp /LenovoLegionLinux/kernel_module/* /usr/src/LenovoLegionLinux-1.0.0 -r && \
dkms add -m LenovoLegionLinux -v 1.0.0 && \
dkms build -m LenovoLegionLinux -v 1.0.0 -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') && \
dkms install -m LenovoLegionLinux -v 1.0.0 -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') && \
echo legion-laptop > /etc/modules-load.d/legion_laptop.conf && \
rm -rf LenovoLegionLinux
# The first check makes sure that we have exactly 4 gpg pubkeys trusted in the rpmdb (the ones from the base image).
# Any more than that means that dnf automatically added a new one, which is shady!
# Then: cleanup image for linting
# Finally: verify image is good
# FIXME - remove the `--skip nonempty-run-tmp` when it's no longer needed
RUN [[ 4 -eq $(rpm -qa gpg-pubkey* | wc -l) ]] && \
rm -rf /var /boot && mkdir /var /boot && \
bootc container lint --fatal-warnings --skip nonempty-run-tmp