From 6e7cd78e7cb7b5685b44a5773c0f99b846844a16 Mon Sep 17 00:00:00 2001 From: Quinten Date: Thu, 4 Apr 2024 09:25:21 +0200 Subject: [PATCH] install back dotnet 5 alt:v --- games/altv/Dockerfile | 15 ++++++++++----- games/altv/entrypoint.sh | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/games/altv/Dockerfile b/games/altv/Dockerfile index c7ad923..d035f76 100644 --- a/games/altv/Dockerfile +++ b/games/altv/Dockerfile @@ -12,13 +12,18 @@ RUN useradd -m -d /home/container -s /bin/bash container RUN apt update -y \ && apt upgrade -y \ && apt install -y g++ gcc libgcc-s1 lib32gcc-s1 gdb libstdc++6 libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-traditional telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ - libfontconfig1 libicu72 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata \ + libfontconfig1 libicu72 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata libgdiplus\ python3 dnsutils build-essential coreutils jq pcregrep tini -RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ - && dpkg -i packages-microsoft-prod.deb \ - && apt update -y \ - && apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 libgdiplus +RUN wget https://dot.net/v1/dotnet-install.sh \ + && D_V_5="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/5.0 | grep -i '

SDK 5.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && D_V_6="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/6.0 | grep -i '

SDK 6.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && D_V_7="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/7.0 | grep -i '

SDK 7.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V_5 \ + && ./dotnet-install.sh -i /usr/share -v $D_V_6 \ + && ./dotnet-install.sh -i /usr/share -v $D_V_7 \ + && ln -s /usr/share/dotnet /usr/bin/dotnet RUN update-locale lang=en_US.UTF-8 \ && dpkg-reconfigure --frontend noninteractive locales diff --git a/games/altv/entrypoint.sh b/games/altv/entrypoint.sh index 11acd70..6e7a50a 100644 --- a/games/altv/entrypoint.sh +++ b/games/altv/entrypoint.sh @@ -5,6 +5,8 @@ cd /home/container INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') export INTERNAL_IP +export DOTNET_ROOT=/usr/share/ + # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}"