Remove unused dependencies

This commit is contained in:
Josh.5
2025-06-23 20:22:13 +00:00
parent 605687a668
commit 183143c158

View File

@@ -307,91 +307,6 @@ RUN \
&& \
echo
# Install Web Frontend
ARG NODE_VERSION="v20"
ARG FRONTEND_VERSION=29e93b2
RUN \
echo "**** Install Node ${NODE_VERSION} ****" \
&& mkdir -p /tmp/nodejs \
&& rm -rf /opt/nodejs \
&& wget -qO /tmp/nodejs/nodejs.tar.xz \
"https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/node-$(wget -qO- https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/ | sed -nE 's|.*>node-(.*)-linux-x64\.tar.xz</a>.*|\1|p')-linux-x64.tar.xz" \
&& tar -xJf /tmp/nodejs/nodejs.tar.xz -C /tmp/nodejs --strip-components=1 \
&& mv /tmp/nodejs /opt/nodejs \
&& ln -sf /opt/nodejs/bin/node /usr/local/bin/node \
&& ln -sf /opt/nodejs/bin/npm /usr/local/bin/npm \
&& ln -sf /opt/nodejs/bin/npx /usr/local/bin/npx \
&& \
echo "**** Fetch Web Frontend ****" \
&& mkdir -p /opt \
&& cd /opt \
&& rm -rf /opt/frontend \
&& git clone https://github.com/Steam-Headless/frontend.git --branch dev-SHUI /opt/frontend \
&& cd /opt/frontend \
&& git checkout ${FRONTEND_VERSION} 2> /dev/null \
&& git submodule init \
&& git submodule update --depth 1 --recursive \
&& rm -rf /opt/frontend/.git \
&& \
echo "**** Install SHUIv2 requirements ****" \
&& cd /opt/frontend \
&& python3 -m venv --symlinks ./venv \
&& ./venv/bin/python3 -m pip install --no-cache-dir --upgrade pip \
&& ./venv/bin/python3 -m pip install --no-cache-dir -r ./requirements.txt \
&& \
echo "**** Build SHUIv2 vue ****" \
&& cd /opt/frontend \
&& cd ./shui2/shui-vue/ \
&& npm ci \
&& npm run build \
&& cd /opt/frontend \
&& cd ./shui2/server/ \
&& npm ci \
&& \
echo "**** Configure Web Frontend ****" \
&& cd /opt/frontend \
&& echo '<!DOCTYPE html>' > ./index.html \
&& 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>' >> ./index.html \
&& chmod -R a+r . \
&& convert ./web/images/icons/novnc-ios-180.png -resize "128x128" /tmp/steam-headless.png \
&& xdg-icon-resource install --novendor --size 128 /tmp/steam-headless.png \
&& \
echo "**** Section cleanup ****" \
&& rm -f /tmp/steam-headless.png
# Install Websockify
ARG WEBSOCKETIFY_VERSION=0.11.0
RUN \
echo "**** Update apt database ****" \
&& apt-get update \
&& \
echo "**** Install Websockify dependencies ****" \
&& apt-get install -y \
python3-numpy \
python3-requests \
python3-jwcrypto \
python3-redis \
&& \
echo "**** Fetch Websockify ****" \
&& cd /tmp \
&& wget -O /tmp/websockify.tar.gz https://github.com/novnc/websockify/archive/v${WEBSOCKETIFY_VERSION}.tar.gz \
&& \
echo "**** Extract Websockify ****" \
&& cd /tmp \
&& tar -xvf /tmp/websockify.tar.gz \
&& \
echo "**** Install Websockify to Web Frontend path ****" \
&& cd /tmp \
&& mv -v /tmp/websockify-${WEBSOCKETIFY_VERSION} /opt/frontend/utils/websockify \
&& \
echo "**** Section cleanup ****" \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/websockify-* \
/tmp/websockify.tar.gz
# Setup audio streaming deps
RUN \
echo "**** Update apt database ****" \
@@ -521,6 +436,55 @@ RUN \
&& \
echo
# Install Web Frontend
ARG NODE_VERSION="v20"
ARG FRONTEND_VERSION=29e93b2
RUN \
echo "**** Install Node ${NODE_VERSION} ****" \
&& mkdir -p /tmp/nodejs \
&& rm -rf /opt/nodejs \
&& wget -qO /tmp/nodejs/nodejs.tar.xz \
"https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/node-$(wget -qO- https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/ | sed -nE 's|.*>node-(.*)-linux-x64\.tar.xz</a>.*|\1|p')-linux-x64.tar.xz" \
&& tar -xJf /tmp/nodejs/nodejs.tar.xz -C /tmp/nodejs --strip-components=1 \
&& mv /tmp/nodejs /opt/nodejs \
&& ln -sf /opt/nodejs/bin/node /usr/local/bin/node \
&& ln -sf /opt/nodejs/bin/npm /usr/local/bin/npm \
&& ln -sf /opt/nodejs/bin/npx /usr/local/bin/npx \
&& \
echo "**** Fetch Web Frontend ****" \
&& mkdir -p /opt \
&& cd /opt \
&& rm -rf /opt/frontend \
&& git clone https://github.com/Steam-Headless/frontend.git --branch dev-SHUI /opt/frontend \
&& cd /opt/frontend \
&& git checkout ${FRONTEND_VERSION} 2> /dev/null \
&& git submodule init \
&& git submodule update --depth 1 --recursive \
&& rm -rf /opt/frontend/.git \
&& \
echo "**** Install SHUIv2 requirements ****" \
&& cd /opt/frontend \
&& python3 -m venv --symlinks ./venv \
&& ./venv/bin/python3 -m pip install --no-cache-dir --upgrade pip \
&& ./venv/bin/python3 -m pip install --no-cache-dir -r ./requirements.txt \
&& \
echo "**** Build SHUIv2 vue ****" \
&& cd /opt/frontend \
&& cd ./shui2/shui-vue/ \
&& npm ci \
&& npm run build \
&& cd /opt/frontend \
&& cd ./shui2/server/ \
&& npm ci \
&& \
echo "**** Install Web Frontend icon ****" \
&& cd /opt/frontend \
&& convert ./web/images/icons/novnc-ios-180.png -resize "128x128" /tmp/steam-headless.png \
&& xdg-icon-resource install --novendor --size 128 /tmp/steam-headless.png \
&& \
echo "**** Section cleanup ****" \
&& rm -f /tmp/steam-headless.png
# TODO: Deprecate neko
# Install Neko server
COPY --from=m1k1o/neko:base /usr/bin/neko /usr/bin/neko