From 222b3f16e4ff15c87785bbc80c86e1e9b000192b Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 8 Mar 2023 16:20:34 +0100 Subject: [PATCH] update dotnet --- dotnet/2.1/Dockerfile | 5 +++-- dotnet/3.1/Dockerfile | 5 +++-- dotnet/5/Dockerfile | 7 ++++--- dotnet/6/Dockerfile | 7 ++++--- dotnet/7/Dockerfile | 7 ++++--- dotnet/entrypoint.sh | 4 ++++ 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/dotnet/2.1/Dockerfile b/dotnet/2.1/Dockerfile index 2dd9420..d2c26c9 100644 --- a/dotnet/2.1/Dockerfile +++ b/dotnet/2.1/Dockerfile @@ -6,8 +6,9 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 libgdiplus \ - && wget https://dot.net/v1/dotnet-install.sh \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/2.1 | grep -i '

SDK 2.1.*

' | 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 2.1.818 \ && ln -s /usr/share/dotnet /usr/bin/dotnet diff --git a/dotnet/3.1/Dockerfile b/dotnet/3.1/Dockerfile index d326698..c4b59c8 100644 --- a/dotnet/3.1/Dockerfile +++ b/dotnet/3.1/Dockerfile @@ -6,8 +6,9 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 libgdiplus \ - && wget https://dot.net/v1/dotnet-install.sh \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/3.1 | grep -i '

SDK 3.1.*

' | 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 3.1.425 \ && ln -s /usr/share/dotnet /usr/bin/dotnet diff --git a/dotnet/5/Dockerfile b/dotnet/5/Dockerfile index 0fc1f46..5a347cd 100644 --- a/dotnet/5/Dockerfile +++ b/dotnet/5/Dockerfile @@ -6,10 +6,11 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 libgdiplus \ - && wget https://dot.net/v1/dotnet-install.sh \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(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')" \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh -i /usr/share -v 5.0.408 \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ && ln -s /usr/share/dotnet /usr/bin/dotnet USER container diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile index f12bb9f..6d696c6 100644 --- a/dotnet/6/Dockerfile +++ b/dotnet/6/Dockerfile @@ -6,10 +6,11 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 libgdiplus \ - && wget https://dot.net/v1/dotnet-install.sh \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(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')" \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh -i /usr/share -v 6.0.403 \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ && ln -s /usr/share/dotnet /usr/bin/dotnet USER container diff --git a/dotnet/7/Dockerfile b/dotnet/7/Dockerfile index ca2cb5d..5b6d454 100644 --- a/dotnet/7/Dockerfile +++ b/dotnet/7/Dockerfile @@ -6,10 +6,11 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 libgdiplus \ - && wget https://dot.net/v1/dotnet-install.sh \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(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 7.0.100 \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ && ln -s /usr/share/dotnet /usr/bin/dotnet USER container diff --git a/dotnet/entrypoint.sh b/dotnet/entrypoint.sh index d8671f6..b9fd77c 100644 --- a/dotnet/entrypoint.sh +++ b/dotnet/entrypoint.sh @@ -8,6 +8,10 @@ export INTERNAL_IP # set this variable, dotnet needs it even without it it reports to `dotnet --info` it can not start any aplication without this export DOTNET_ROOT=/usr/share/ +# print the dotnet version on startup +printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mdotnet --version\n" +dotnet --version + # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}"