Update Dockerfile for improved stability and clarity

This commit is contained in:
Kyle Speight
2026-05-29 22:54:55 -07:00
committed by GitHub
parent 6a214186c7
commit 5d5953ded5
+6 -5
View File
@@ -4,7 +4,7 @@ LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me"
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# 1. Install basics (Ubuntu usually has these, but good to ensure) # 1. Install prerequisites
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
lsb-release \ lsb-release \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# 2. Install .NET SDK # 2. Install .NET SDK (Dynamic version detection)
RUN wget -q https://dot.net/v1/dotnet-install.sh \ RUN wget -q https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \ && chmod +x dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
@@ -21,15 +21,16 @@ RUN wget -q https://dot.net/v1/dotnet-install.sh \
&& ln -s /usr/share/dotnet /usr/bin/dotnet \ && ln -s /usr/share/dotnet /usr/bin/dotnet \
&& rm dotnet-install.sh && rm dotnet-install.sh
# 3. Install PowerShell (Now works natively on Ubuntu) # 3. Install PowerShell (HARDCODED to Ubuntu 22.04 for stability)
RUN wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb \ # This works on Ubuntu 20.04, 22.04, and 24.04
RUN wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \
&& apt-get update \ && apt-get update \
&& apt-get install -y powershell \ && apt-get install -y powershell \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# 4. Install remaining deps # 4. Install remaining dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
git \ git \
git-lfs \ git-lfs \