From c0daa84da87bb569ecf55569446c3fdd7a012ebc Mon Sep 17 00:00:00 2001 From: QuintenQVD0 Date: Sun, 6 Nov 2022 17:51:12 +0100 Subject: [PATCH] Dotnet arm64 fix --- dotnet/2.1/Dockerfile | 3 ++- dotnet/3.1/Dockerfile | 5 ++++- dotnet/5/Dockerfile | 3 ++- dotnet/6/Dockerfile | 3 ++- dotnet/entrypoint.sh | 3 +++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dotnet/2.1/Dockerfile b/dotnet/2.1/Dockerfile index b6261d5..2dd9420 100644 --- a/dotnet/2.1/Dockerfile +++ b/dotnet/2.1/Dockerfile @@ -9,7 +9,8 @@ RUN apt update -y \ && apt install -y apt-transport-https wget iproute2 libgdiplus \ && wget https://dot.net/v1/dotnet-install.sh \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh -i /usr/local/bin/ -v 2.1.818 + && ./dotnet-install.sh -i /usr/share -v 2.1.818 \ + && ln -s /usr/share/dotnet /usr/bin/dotnet USER container ENV USER=container HOME=/home/container diff --git a/dotnet/3.1/Dockerfile b/dotnet/3.1/Dockerfile index 274b120..d4ed996 100644 --- a/dotnet/3.1/Dockerfile +++ b/dotnet/3.1/Dockerfile @@ -9,7 +9,10 @@ RUN apt update -y \ && apt install -y apt-transport-https wget iproute2 libgdiplus \ && wget https://dot.net/v1/dotnet-install.sh \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh -i /usr/local/bin/ -v 3.1.424 + && ./dotnet-install.sh -i /usr/share -v 3.1.424 \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + + USER container ENV USER=container HOME=/home/container WORKDIR /home/container diff --git a/dotnet/5/Dockerfile b/dotnet/5/Dockerfile index 102e63c..0fc1f46 100644 --- a/dotnet/5/Dockerfile +++ b/dotnet/5/Dockerfile @@ -9,7 +9,8 @@ RUN apt update -y \ && apt install -y apt-transport-https wget iproute2 libgdiplus \ && wget https://dot.net/v1/dotnet-install.sh \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh -i /usr/local/bin/ -v 5.0.408 + && ./dotnet-install.sh -i /usr/share -v 5.0.408 \ + && ln -s /usr/share/dotnet /usr/bin/dotnet USER container ENV USER=container HOME=/home/container diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile index acb756d..854ea9f 100644 --- a/dotnet/6/Dockerfile +++ b/dotnet/6/Dockerfile @@ -9,7 +9,8 @@ RUN apt update -y \ && apt install -y apt-transport-https wget iproute2 libgdiplus \ && wget https://dot.net/v1/dotnet-install.sh \ && chmod +x dotnet-install.sh \ - && ./dotnet-install.sh -i /usr/local/bin/ + && ./dotnet-install.sh -i /usr/share \ + && ln -s /usr/share/dotnet /usr/bin/dotnet USER container ENV USER=container HOME=/home/container diff --git a/dotnet/entrypoint.sh b/dotnet/entrypoint.sh index 11acd70..d8671f6 100644 --- a/dotnet/entrypoint.sh +++ b/dotnet/entrypoint.sh @@ -5,6 +5,9 @@ cd /home/container INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') 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/ + # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}"