Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Dotnet Install Process #24

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading