From f82bf49a8a9cc1f85871fc160e2fb5b9335bdae7 Mon Sep 17 00:00:00 2001 From: Jaren Damm Date: Tue, 28 Nov 2023 08:37:19 -0600 Subject: [PATCH] fix: Add Dotnet 8 SDK Created Script to Install Dotnet 8 SDK for Runner image. --- Dockerfile | 2 ++ scripts/install_dotnet8.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 scripts/install_dotnet8.sh diff --git a/Dockerfile b/Dockerfile index a3535b6..648ff19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,6 +75,8 @@ RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s COPY ./scripts ./scripts RUN chmod +x ./scripts/* +# Install Dotnet 8 SDK +RUN ./scripts/install_dotnet8.sh # Install gcloud CLI RUN ./scripts/install_gcloud.sh # Install AWS CLI diff --git a/scripts/install_dotnet8.sh b/scripts/install_dotnet8.sh new file mode 100644 index 0000000..d98da6b --- /dev/null +++ b/scripts/install_dotnet8.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Get Ubuntu version +declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi) + +# Download Microsoft signing key and repository +wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + +# Install Microsoft signing key and repository +sudo dpkg -i packages-microsoft-prod.deb + +# Clean up +rm packages-microsoft-prod.deb + +# Update packages +sudo apt update + +apt-get install -y dotnet-sdk-8.0