Update arch just so it builds

This commit is contained in:
tem
2024-06-11 09:06:04 +03:00
committed by Josh Sunnex
parent 47f6f7a176
commit 9cf971f68f

View File

@@ -35,6 +35,7 @@ RUN \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
@@ -49,6 +50,8 @@ RUN \
docbook-xml \ docbook-xml \
docbook-xsl \ docbook-xsl \
fakeroot \ fakeroot \
p7zip \
patch \
git \ git \
jq \ jq \
less \ less \
@@ -67,6 +70,7 @@ RUN \
unzip \ unzip \
vim \ vim \
wget \ wget \
xmlstarlet \
xz \ xz \
&& \ && \
echo "**** Install python ****" \ echo "**** Install python ****" \
@@ -79,6 +83,7 @@ RUN \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
@@ -111,9 +116,10 @@ RUN \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /home/default/.cache/yay \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -rf \ && rm -fr /var/cache/pacman/pkg/* \
/tmp/yay* \ && rm -rf /tmp/yay* \
&& \ && \
echo echo
@@ -126,51 +132,37 @@ RUN \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
# XFS requirements # Install mscorefonts
RUN \ RUN \
echo "**** Install XFS requirements ****" \ echo "**** Install ms fonts ****" \
&& pacman -Syu --noconfirm --needed \ && su - default -c "yay -Syu --noconfirm --needed ttf-msfonts" \
xfsdump \
xfsprogs \
&& \
echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \
&& \
echo
# Install mesa requirements
RUN \
echo "**** Install mesa and vulkan requirements ****" \
&& pacman -Syu --noconfirm --needed \
glu \
libva-mesa-driver \
mesa-utils \
mesa-vdpau \
pciutils \
vulkan-mesa-layers \
vdpauinfo \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /home/default/.cache/yay \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& rm -rf /tmp/yay* \
&& \ && \
echo echo
# Install X Server requirements # Install X Server requirements
ENV \ ENV \
XORG_SOCKET_DIR="/tmp/.X11-unix" \ XORG_SOCKET_DIR="/tmp/.X11-unix" \
XDG_RUNTIME_DIR="/tmp/.X11-unix/run" XDG_RUNTIME_DIR="/tmp/.X11-unix/run" \
XDG_SESSION_TYPE="x11" \
FORCE_X11_DUMMY_CONFIG="false"
RUN \ RUN \
echo "**** Install X Server requirements ****" \ echo "**** Install X Server requirements ****" \
&& pacman -Syu --noconfirm --needed \ && pacman -Syu --noconfirm --needed \
avahi \ avahi \
dbus \ dbus \
lib32-fontconfig \ lib32-fontconfig \
ttf-liberation \ fuse2 \
x11vnc \ x11vnc \
xorg \ xorg \
xorg-apps \ xorg-apps \
@@ -190,11 +182,14 @@ RUN \
xorg-xrandr \ xorg-xrandr \
xorg-xsetroot \ xorg-xsetroot \
xorg-xwininfo \ xorg-xwininfo \
xf86-input-evdev \
xterm \ xterm \
gamescope \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
@@ -213,6 +208,7 @@ RUN \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
@@ -226,110 +222,75 @@ RUN \
xfce4-goodies \ xfce4-goodies \
xfce4-terminal \ xfce4-terminal \
ttf-liberation \ ttf-liberation \
# Delete these as they are not needed at all xdg-user-dirs \
&& rm -f \ xdg-utils \
/usr/share/applications/software-properties-drivers.desktop \ imagemagick \
/usr/share/applications/xfce4-about.desktop \ && \
/usr/share/applications/xfce4-session-logout.desktop \ echo "**** Install WoL Manager requirements ****" \
# Hide these apps. They can be displayed if a user really wants them. && pacman -Syu --noconfirm --needed \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/xfce4-accessibility-settings.desktop \ tcpdump \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/xfce4-color-settings.desktop \ xprintidle \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/xfce4-mail-reader.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/vim.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/thunar-settings.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/thunar.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/pavucontrol.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/x11vnc.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/xterm.desktop \
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/uxterm.desktop \
# Force these apps to be "System" Apps rather than "Categories=System;Utility;Core;GTK;Filesystem;"
&& sed -i 's/^Categories=.*$/Categories=System;/' /usr/share/applications/xfce4-appfinder.desktop \
&& sed -i 's/^Categories=.*$/Categories=System;/' /usr/share/applications/thunar-bulk-rename.desktop \
&& sed -i 's/^Categories=.*$/Categories=System;/' /usr/share/applications/org.gnome.gedit.desktop \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
# TODO: Add support for flatpaks # Add support for flatpaks
# Note: Debian Bullseye had bubblewrap v0.4.1 which worked fine in the Nvidia docker runtime
# At the moment this is only working beacuse /proc is being mounted again in 10-setup_user.sh
# Need to find a better solution for this...
ARG BUBBLEWRAP_VERSION=0.8.0
ENV \ ENV \
XDG_DATA_DIRS="/home/default/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/" XDG_DATA_DIRS="/home/default/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/"
RUN \ RUN \
echo "**** Install flatpak support ****" \ echo "**** Install flatpak support ****" \
&& pacman -Syu --noconfirm --needed \ && pacman -Syu --noconfirm --needed \
flatpak \ flatpak \
gnome-software \
xdg-desktop-portal-gtk \ xdg-desktop-portal-gtk \
gnome-software \
&& \ && \
#echo "**** Build and install custom bubblewrap ****" \
# && cd /tmp \
# && wget -O /tmp/bubblewrap-${BUBBLEWRAP_VERSION:?}.tar.xz https://github.com/containers/bubblewrap/releases/download/v${BUBBLEWRAP_VERSION:?}/bubblewrap-${BUBBLEWRAP_VERSION:?}.tar.xz \
# && tar -xvf /tmp/bubblewrap-${BUBBLEWRAP_VERSION:?}.tar.xz \
# && cd /tmp/bubblewrap-${BUBBLEWRAP_VERSION:?} \
# && sed -i 's|die ("Unexpected capabilities but not setuid, old file caps config?");|printf ("Unexpected capabilities but not setuid, old file caps config?");|' ./bubblewrap.c \
# && ./autogen.sh \
# && make clean \
# && make \
# && make install
#&& \
echo "**** Configure flatpak ****" \ echo "**** Configure flatpak ****" \
&& chmod u-s /usr/bin/bwrap \ && chmod u-s /usr/bin/bwrap \
&& flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo \ && flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo \
&& su - default -c "flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo" \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
# Install noVNC # TODO: Deprecate neko
# TODO: Add nginx or remove the whole proxy setup and just connect directly for audio (I think that is the better option) # Install Neko server
ARG NOVNC_VERSION=1.2.0 COPY --from=m1k1o/neko:base /usr/bin/neko /usr/bin/neko
COPY --from=m1k1o/neko:base /var/www /var/www
# Install Web Frontend
ARG FRONTEND_VERSION=a8eb92f
RUN \ RUN \
echo "**** Fetch noVNC ****" \ echo "**** Fetch Web Frontend ****" \
&& cd /tmp \
&& wget -O /tmp/novnc.tar.gz https://github.com/novnc/noVNC/archive/v${NOVNC_VERSION}.tar.gz \
&& \
echo "**** Extract noVNC ****" \
&& cd /tmp \
&& tar -xvf /tmp/novnc.tar.gz \
&& \
echo "**** Configure noVNC ****" \
&& cd /tmp/noVNC-${NOVNC_VERSION} \
&& sed -i 's/credentials: { password: password } });/credentials: { password: password },\n wsProtocols: ["'"binary"'"] });/g' app/ui.js \
&& mkdir -p /opt \ && mkdir -p /opt \
&& rm -rf /opt/noVNC \
&& cd /opt \ && cd /opt \
&& mv -f /tmp/noVNC-${NOVNC_VERSION} /opt/noVNC \ && rm -rf /opt/frontend \
&& cd /opt/noVNC \ && git clone https://github.com/Steam-Headless/frontend.git --branch master /opt/frontend \
&& ln -s vnc.html index.html \ && cd /opt/frontend \
&& chmod -R 755 /opt/noVNC \ && git checkout ${FRONTEND_VERSION} 2> /dev/null \
&& git submodule init \
&& git submodule update --depth 1 --recursive \
&& rm -rf /opt/frontend/.git \
&& \ && \
echo "**** Modify noVNC title ****" \ echo "**** Configure Web Frontend ****" \
&& sed -i '/ document.title =/c\ document.title = "Steam Headless - noVNC";' \ && echo '<!DOCTYPE html>' > /opt/frontend/index.html \
/opt/noVNC/app/ui.js \ && echo '<html><head><meta http-equiv="refresh" content="0;url=./web/"></head><body><p>If you are not redirected, <a href="./web/">click here</a>.</p></body></html>' >> /opt/frontend/index.html \
&& \ && chmod -R 755 /opt/frontend \
echo "**** Install nginx support ****" \ && convert /opt/frontend/web/images/icons/novnc-ios-180.png -resize "128x128" /tmp/steam-headless.png \
&& pacman -Syu --noconfirm --needed \ && xdg-icon-resource install --novendor --size 128 /tmp/steam-headless.png \
nginx \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && rm -f /tmp/steam-headless.png
&& rm -fr /var/lib/pacman/sync/* \
&& rm -rf \
/tmp/noVNC* \
/tmp/novnc.tar.gz \
&& \
echo
# Install Websockify # Install Websockify
ARG WEBSOCKETIFY_VERSION=0.10.0 ARG WEBSOCKETIFY_VERSION=0.11.0
RUN \ RUN \
echo "**** Fetch Websockify ****" \ echo "**** Fetch Websockify ****" \
&& cd /tmp \ && cd /tmp \
@@ -345,6 +306,7 @@ RUN \
&& \ && \
echo "**** Install Websockify to noVNC path ****" \ echo "**** Install Websockify to noVNC path ****" \
&& cd /tmp \ && cd /tmp \
&& mkdir -p /opt/noVNC/utils \
&& mv -v /tmp/websockify-${WEBSOCKETIFY_VERSION} /opt/noVNC/utils/websockify \ && mv -v /tmp/websockify-${WEBSOCKETIFY_VERSION} /opt/noVNC/utils/websockify \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
@@ -365,51 +327,148 @@ RUN \
gst-plugins-good \ gst-plugins-good \
gst-plugins-ugly \ gst-plugins-ugly \
&& \ && \
echo "**** Fetch ucspi-tcp ****" \ #echo "**** Fetch ucspi-tcp ****" \
&& mkdir -p /tmp/ucspi-tcp-0.88 \ # && mkdir -p /tmp/ucspi-tcp-0.88 \
&& cd /tmp \ # && cd /tmp \
#&& wget -O /tmp/ucspi-tcp.tar.gz https://github.com/trafficgate/ucspi-tcp/archive/refs/heads/master.tar.gz \ # #&& wget -O /tmp/ucspi-tcp.tar.gz https://github.com/trafficgate/ucspi-tcp/archive/refs/heads/master.tar.gz \
&& wget -O /tmp/ucspi-tcp.tar.gz http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz \ # && wget -O /tmp/ucspi-tcp.tar.gz http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz \
&& cd /tmp/ucspi-tcp-0.88 \ # && cd /tmp/ucspi-tcp-0.88 \
&& tar -xvf /tmp/ucspi-tcp.tar.gz --strip-components=1 \ # && tar -xvf /tmp/ucspi-tcp.tar.gz --strip-components=1 \
#&& \
#echo "**** Build and install ucspi-tcp ****" \
# && wget -O /tmp/ucspi-tcp-0.88/ucspi-tcp-0.88.errno.patch https://git.alpinelinux.org/aports/plain/testing/ucspi-tcp/ucspi-tcp-0.88.errno.patch \
# && wget -O /tmp/ucspi-tcp-0.88/ucspi-tcp-0.88.a_record.patch https://git.alpinelinux.org/aports/plain/testing/ucspi-tcp/ucspi-tcp-0.88.a_record.patch \
# && patch -p1 --input=ucspi-tcp-0.88.errno.patch \
# && patch -p1 --input=ucspi-tcp-0.88.a_record.patch \
# && sed -i 's|^/usr/local|/usr|' /tmp/ucspi-tcp-0.88/conf-home \
# && make \
# && for f in tcpserver tcprules tcprulescheck argv0 recordio tcpclient *\@ tcpcat mconnect mconnect-io addcr delcr fixcrio rblsmtpd; do \
# cp $f /usr/bin/$f; \
# done \
#&& \
echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo "**** Build and install ucspi-tcp ****" \ echo
&& wget -O /tmp/ucspi-tcp-0.88/ucspi-tcp-0.88.errno.patch https://git.alpinelinux.org/aports/plain/testing/ucspi-tcp/ucspi-tcp-0.88.errno.patch \
&& wget -O /tmp/ucspi-tcp-0.88/ucspi-tcp-0.88.a_record.patch https://git.alpinelinux.org/aports/plain/testing/ucspi-tcp/ucspi-tcp-0.88.a_record.patch \ # Setup video streaming deps
&& patch -p1 --input=ucspi-tcp-0.88.errno.patch \ RUN \
&& patch -p1 --input=ucspi-tcp-0.88.a_record.patch \ echo "**** Install video streaming deps ****" \
&& sed -i 's|^/usr/local|/usr|' /tmp/ucspi-tcp-0.88/conf-home \ && pacman -Syu --noconfirm --needed \
&& make \ libva \
&& for f in tcpserver tcprules tcprulescheck argv0 recordio tcpclient *\@ tcpcat mconnect mconnect-io addcr delcr fixcrio rblsmtpd; do \ libva-mesa-driver \
cp $f /usr/bin/$f; \ libva-intel-driver \
done \ libva-vdpau-driver \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -rf \ && rm -fr /var/cache/pacman/pkg/* \
/tmp/ucspi-tcp-* \ && \
echo
# Install tools for monitoring hardware
RUN \
echo "**** Install audio streaming deps ****" \
&& pacman -Syu --noconfirm --needed \
#cpu-x \
htop \
libva-utils \
vdpauinfo \
&& \
echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \
echo
# Install Sunshine
RUN \
echo "**** Install stable sunshine ****" \
&& su - default -c "yay -Syu --noconfirm --needed miniupnpc sunshine-bin" \
&& setcap cap_sys_admin+p $(readlink -f $(which sunshine)) \
&& \
echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \
&& rm -fr /home/default/.cache/yay \
&& rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& rm -rf /tmp/yay* \
&& \
echo
# Install Firefox
RUN \
echo "**** Install Firefox ****" \
&& pacman -Syu --noconfirm --needed \
firefox \
&& \
echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \ && \
echo echo
# Install Steam # Install Steam
RUN \ RUN \
echo "**** Install X Server requirements ****" \ echo "**** Install Steam ****" \
&& pacman -Syu --noconfirm --needed \ && pacman -Syu --noconfirm --needed \
steam \ steam \
&& \ && \
echo "**** Section cleanup ****" \ echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \ && pacman -Scc --noconfirm \
&& rm -fr /var/lib/pacman/sync/* \ && rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& \
echo
# Various other tools
ARG DUMB_INIT_VERSION=1.2.5
ARG DUMB_UDEV_VERSION=64d1427
RUN \
echo "**** Install dumb-init ****" \
&& wget --no-check-certificate --no-cookies --quiet \
-O /usr/bin/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_x86_64 \
&& chmod +x /usr/bin/dumb-init \
&& \
echo "**** Install dumb-udev ****" \
&& python3 -m pip install \
--break-system-packages \
--pre \
--upgrade \
--no-cache-dir \
git+https://github.com/Steam-Headless/dumb-udev.git@${DUMB_UDEV_VERSION} \
&& \
echo
# Install Protonup replacement
RUN \
echo "**** Install PorotonUP ****" \
&& su - default -c "yay -Sy --noconfirm --needed --overwrite \"/usr/bin/normalizer\" protonup-qt" \
&& \
echo "**** Section cleanup ****" \
&& pacman -Scc --noconfirm \
&& rm -fr /home/default/.cache/yay \
&& rm -fr /var/lib/pacman/sync/* \
&& rm -fr /var/cache/pacman/pkg/* \
&& rm -rf /tmp/yay* \
&& \ && \
echo echo
# Add FS overlay # Add FS overlay
COPY overlay / COPY overlay /
# Tweaks as flatpak issue isn't sorted
RUN \ RUN \
echo "**** Setup Steam Supervisor ****" \ echo "**** Tweaks for Arch ****" \
&& sed -i 's#/usr/games/steam#/usr/bin/steam#g' /etc/supervisor.d/steam.ini \ && sed -i d /usr/bin/install_firefox.sh \
&& sed -i d /usr/bin/install_protonup.sh \
&& sed -i d /templates/home_directory_template/.local/share/xfce4/helpers/custom-WebBrowser.desktop \
&& \ && \
echo echo
@@ -426,6 +485,7 @@ ENV \
NVIDIA_VISIBLE_DEVICES="all" NVIDIA_VISIBLE_DEVICES="all"
# Set container configuration environment variables # Set container configuration environment variables
# APPIMAGE_EXTRACT_AND_RUN="0"
ENV \ ENV \
MODE="primary" \ MODE="primary" \
WEB_UI_MODE="vnc" \ WEB_UI_MODE="vnc" \
@@ -434,8 +494,9 @@ ENV \
NEKO_PASSWORD_ADMIN=admin \ NEKO_PASSWORD_ADMIN=admin \
ENABLE_STEAM="true" \ ENABLE_STEAM="true" \
STEAM_ARGS="-silent" \ STEAM_ARGS="-silent" \
ENABLE_SUNSHINE="false" \ ENABLE_SUNSHINE="true" \
ENABLE_EVDEV_INPUTS="false" ENABLE_EVDEV_INPUTS="true" \
ENABLE_WOL_POWER_MANAGER="false"
# Configure required ports # Configure required ports
ENV \ ENV \