Skip to content

Commit

Permalink
fix: Update Dotnet Install Process
Browse files Browse the repository at this point in the history
Previous Setup for .Netnet 8 install somehow removed .Net6 this setup properly setups the use of both and insures the latest versions of 6 & 8 are update to date.
  • Loading branch information
JarenDamm committed Nov 29, 2023
1 parent f407603 commit 876ba4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ RUN apt update -y \
postgresql-client \
python3 \
python3-pip \
dotnet-sdk-6.0 \
aspnetcore-runtime-6.0 \
docker-compose \
rsync \
shellcheck \
Expand Down Expand Up @@ -76,7 +74,7 @@ COPY ./scripts ./scripts
RUN chmod +x ./scripts/*

# Install Dotnet 8 SDK
RUN ./scripts/install_dotnet8.sh
RUN ./scripts/install_dotnet.sh
# Install gcloud CLI
RUN ./scripts/install_gcloud.sh
# Install AWS CLI
Expand Down Expand Up @@ -151,7 +149,7 @@ RUN chmod +x /usr/bin/gh_entrypoint.sh /usr/bin/logger.bash

# Add the Go and Python "User Script Directory" to the PATH
ENV GOPATH=$HOME/go
ENV PATH="${PATH}:${HOME}/.local/bin:/usr/local/go/bin:$GOPATH/bin"
ENV PATH="${PATH}:${HOME}/.local/bin:/usr/local/go/bin:$GOPATH/bin:/usr/share/dotnet"
ENV ImageOS=ubuntu22

RUN echo "PATH=${PATH}" > /etc/environment \
Expand Down
12 changes: 12 additions & 0 deletions scripts/install_dotnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Get latest .NET 6 version
dotnet6_version=$(curl -s https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json | grep -Po '(?<="latest-sdk": ")[^"]*')
# Get latest .NET 8 version
dotnet8_version=$(curl -s https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json | grep -Po '(?<="latest-sdk": ")[^"]*')

curl -SL --output dotnet-install.sh https://dot.net/v1/dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --version $dotnet6_version --install-dir /usr/share/dotnet && \
./dotnet-install.sh --version $dotnet8_version --install-dir /usr/share/dotnet && \
rm dotnet-install.sh
18 changes: 0 additions & 18 deletions scripts/install_dotnet8.sh

This file was deleted.

0 comments on commit 876ba4c

Please sign in to comment.