Skip to content

Commit

Permalink
Update Containerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywatchin committed Nov 3, 2024
1 parent e52512d commit 9735ca3
Showing 1 changed file with 21 additions and 33 deletions.
54 changes: 21 additions & 33 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Use the SteamOS container as the base
FROM lscr.io/linuxserver/steamos:latest

# Install needed packages
RUN pacman -Sy \
# Install initial packages
RUN pacman -Sy --noconfirm \
paru \
lib32-vulkan-radeon \
libva-mesa-driver \
Expand Down Expand Up @@ -35,58 +35,46 @@ RUN pacman -Sy \
rocm-hip-runtime \
libbsd \
noto-fonts-cjk \
glibc-locales \
--noconfirm && \
# Install additional packages
pacman -S \
glibc-locales && \
pacman -S --noconfirm \
lutris \
mangohud \
lib32-mangohud \
--noconfirm \
# Install EmuDeck and Decky Launcher
lib32-mangohud

# Install EmuDeck
RUN curl -L https://raw.githubusercontent.com/dragoonDorise/EmuDeck/main/install.sh | bash

# Install Decky Loader
RUN curl -S -s -L -O --output-dir /tmp/ --connect-timeout 60 https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/user_install_script.sh && \
bash /tmp/user_install_script.sh || echo "Something went wrong, please report this if it is a bug"

# Install LatencyFlex
RUN wget https://raw.githubusercontent.com/Shringe/LatencyFleX-Installer/main/install.sh -O /usr/bin/latencyflex && \
sed -i 's@"dxvk.conf"@"/usr/share/latencyflex/dxvk.conf"@g' /usr/bin/latencyflex && \
chmod +x /usr/bin/latencyflex \
pacman -S --clean --clean && \
rm -rf /var/cache/pacman/pkg/*
# Steam/Lutris/Wine installed separately so they use the dependencies above and don't try to install their own.

# Create build user
#RUN useradd -m --shell=/bin/bash build && usermod -L build && \
# echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
# echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
chmod +x /usr/bin/latencyflex

# Install AUR packages
RUN useradd -m --shell=/bin/bash build && usermod -L build && \
echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER build
WORKDIR /home/build
RUN paru -S \
RUN paru -S --noconfirm \
aur/protontricks \
aur/vkbasalt \
aur/lib32-vkbasalt \
aur/obs-vkcapture-git \
aur/lib32-obs-vkcapture-git \
aur/lib32-gperftools \
aur/steamcmd \
--noconfirm
aur/steamcmd

# Switch back to root and clean up
USER root
WORKDIR /

# Cleanup
# Native march & tune. This is a gaming image and not something a user is going to compile things in with the intent to share.
# We do this last because it'll only apply to updates the user makes going forward. We don't want to optimize for the build host's environment.
RUN sed -i 's@ (Runtime)@@g' /usr/share/applications/steam.desktop && \
sed -i 's/-march=x86-64 -mtune=generic/-march=native -mtune=native/g' /etc/makepkg.conf && \
userdel -r build && \
rm -drf /home/build && \
RUN userdel -r build && \
sed -i '/build ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
sed -i '/root ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
rm -rf /home/build/.cache/* && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/*
rm -rf /home/build && \
pacman -Scc --noconfirm && \
rm -rf /var/cache/pacman/pkg/* /tmp/*

0 comments on commit 9735ca3

Please sign in to comment.