-
Notifications
You must be signed in to change notification settings - Fork 23
/
Containerfile
103 lines (95 loc) · 3.19 KB
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FROM ghcr.io/ublue-os/arch-distrobox AS bazzite-arch
COPY system_files /
# Install needed packages
RUN pacman -Syu \
lib32-vulkan-radeon \
libva-mesa-driver \
intel-media-driver \
vulkan-mesa-layers \
lib32-vulkan-mesa-layers \
lib32-libnm \
openal \
pipewire \
pipewire-pulse \
pipewire-alsa \
pipewire-jack \
wireplumber \
lib32-pipewire \
lib32-pipewire-jack \
lib32-libpulse \
lib32-openal \
xdg-desktop-portal-kde \
vim \
nano \
hyfetch \
fish \
yad \
xdg-user-dirs \
xdotool \
xorg-xwininfo \
wmctrl \
wxwidgets-gtk3 \
rocm-opencl-runtime \
rocm-hip-runtime \
libbsd \
noto-fonts-cjk \
glibc-locales \
--noconfirm && \
pacman -S \
steam \
lutris \
mangohud \
lib32-mangohud \
--noconfirm && \
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
# Install AUR packages
USER build
WORKDIR /home/build
RUN paru -S \
aur/protontricks \
aur/vkbasalt \
aur/lib32-vkbasalt \
aur/obs-vkcapture-git \
aur/lib32-obs-vkcapture-git \
aur/lib32-gperftools \
aur/steamcmd \
--noconfirm
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 && \
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/*
FROM bazzite-arch as bazzite-arch-gnome
# Replace KDE portal with GNOME portal, swap included icon theme.
RUN sed -i 's/-march=native -mtune=native/-march=x86-64 -mtune=generic/g' /etc/makepkg.conf && \
pacman -Rnsdd \
xdg-desktop-portal-kde \
--noconfirm && \
pacman -S \
xdg-desktop-portal-gtk \
xdg-desktop-portal-gnome \
--noconfirm && \
rm -rf /var/cache/pacman/pkg/*
# Cleanup
RUN sed -i 's/-march=x86-64 -mtune=generic/-march=native -mtune=native/g' /etc/makepkg.conf && \
rm -rf \
/tmp/*