From 83030416ae5ad2efcb6318b9c67f158563a6fecb Mon Sep 17 00:00:00 2001 From: QuintenQVD0 Date: Sun, 6 Nov 2022 15:42:51 +0100 Subject: [PATCH 1/4] dotnet for arm64 --- .github/workflows/dotnet.yml | 4 +++- dotnet/2.1/Dockerfile | 10 ++++------ dotnet/3.1/Dockerfile | 11 ++++------- dotnet/5/Dockerfile | 10 ++++------ dotnet/6/Dockerfile | 10 ++++------ 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ff621f1..9fa1702 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -22,6 +22,8 @@ jobs: - 6 steps: - uses: actions/checkout@v3 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v1 - uses: docker/setup-buildx-action@v2 with: version: "v0.8.2" @@ -35,7 +37,7 @@ jobs: with: context: ./dotnet file: ./dotnet/${{ matrix.tag }}/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | ghcr.io/parkervcp/yolks:dotnet_${{ matrix.tag }} diff --git a/dotnet/2.1/Dockerfile b/dotnet/2.1/Dockerfile index 440f50b..b6261d5 100644 --- a/dotnet/2.1/Dockerfile +++ b/dotnet/2.1/Dockerfile @@ -6,12 +6,10 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 \ - && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ - && dpkg -i packages-microsoft-prod.deb \ - && rm packages-microsoft-prod.deb \ - && apt update -y \ - && apt install -y aspnetcore-runtime-2.1 libgdiplus + && 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 USER container ENV USER=container HOME=/home/container diff --git a/dotnet/3.1/Dockerfile b/dotnet/3.1/Dockerfile index f655e82..274b120 100644 --- a/dotnet/3.1/Dockerfile +++ b/dotnet/3.1/Dockerfile @@ -6,13 +6,10 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 \ - && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ - && dpkg -i packages-microsoft-prod.deb \ - && rm packages-microsoft-prod.deb \ - && apt update -y \ - && apt install -y aspnetcore-runtime-3.1 libgdiplus - + && 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 USER container ENV USER=container HOME=/home/container WORKDIR /home/container diff --git a/dotnet/5/Dockerfile b/dotnet/5/Dockerfile index 2fe9f19..102e63c 100644 --- a/dotnet/5/Dockerfile +++ b/dotnet/5/Dockerfile @@ -6,12 +6,10 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 \ - && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ - && dpkg -i packages-microsoft-prod.deb \ - && rm packages-microsoft-prod.deb \ - && apt update -y \ - && apt install -y aspnetcore-runtime-5.0 libgdiplus + && 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 USER container ENV USER=container HOME=/home/container diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile index 7880a3e..acb756d 100644 --- a/dotnet/6/Dockerfile +++ b/dotnet/6/Dockerfile @@ -6,12 +6,10 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt update -y \ && apt upgrade -y \ - && apt install -y apt-transport-https wget iproute2 \ - && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ - && dpkg -i packages-microsoft-prod.deb \ - && rm packages-microsoft-prod.deb \ - && apt update -y \ - && apt install -y aspnetcore-runtime-6.0 libgdiplus + && 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/ USER container ENV USER=container HOME=/home/container From c0daa84da87bb569ecf55569446c3fdd7a012ebc Mon Sep 17 00:00:00 2001 From: QuintenQVD0 Date: Sun, 6 Nov 2022 17:51:12 +0100 Subject: [PATCH 2/4] 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}" From 50948f3b2926163e2313d28fed2aa10d0d5b3536 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 12 Nov 2022 11:37:06 +0100 Subject: [PATCH 3/4] add dotnet 7 --- .github/workflows/dotnet.yml | 1 + dotnet/3.1/Dockerfile | 2 +- dotnet/6/Dockerfile | 2 +- dotnet/7/Dockerfile | 20 ++++++++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 dotnet/7/Dockerfile diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9fa1702..6da4d74 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,6 +20,7 @@ jobs: - 3.1 - 5 - 6 + - 7 steps: - uses: actions/checkout@v3 # Setup QEMU for ARM64 Build diff --git a/dotnet/3.1/Dockerfile b/dotnet/3.1/Dockerfile index d4ed996..d326698 100644 --- a/dotnet/3.1/Dockerfile +++ b/dotnet/3.1/Dockerfile @@ -9,7 +9,7 @@ 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/share -v 3.1.424 \ + && ./dotnet-install.sh -i /usr/share -v 3.1.425 \ && ln -s /usr/share/dotnet /usr/bin/dotnet diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile index 854ea9f..f12bb9f 100644 --- a/dotnet/6/Dockerfile +++ b/dotnet/6/Dockerfile @@ -9,7 +9,7 @@ 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/share \ + && ./dotnet-install.sh -i /usr/share -v 6.0.403 \ && ln -s /usr/share/dotnet /usr/bin/dotnet USER container diff --git a/dotnet/7/Dockerfile b/dotnet/7/Dockerfile new file mode 100644 index 0000000..03b5441 --- /dev/null +++ b/dotnet/7/Dockerfile @@ -0,0 +1,20 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/parkervcp/yolks:debian + +LABEL author="Torsten Widmann" maintainer="info@goover.de" + +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 \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v 7.0.100 \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] From 415a61de92b860016687711b3d208eb777006b42 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 12 Nov 2022 11:41:40 +0100 Subject: [PATCH 4/4] fix spacing --- dotnet/7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/7/Dockerfile b/dotnet/7/Dockerfile index 66bf4ed..ca2cb5d 100644 --- a/dotnet/7/Dockerfile +++ b/dotnet/7/Dockerfile @@ -9,7 +9,7 @@ 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/share -v 7.0.100 \ + && ./dotnet-install.sh -i /usr/share -v 7.0.100 \ && ln -s /usr/share/dotnet /usr/bin/dotnet USER container