Skip to content

Commit 47293e1

Browse files
committed
Use a script to install dotnet
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 99575dd commit 47293e1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ ENV LC_ALL=en_US.UTF-8
99
RUN apt-get update \
1010
&& apt-get install -y curl
1111

12-
RUN curl --location https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb \
13-
--output packages-microsoft-prod.deb \
14-
&& dpkg -i packages-microsoft-prod.deb \
15-
&& rm packages-microsoft-prod.deb
16-
17-
RUN apt-get update && \
18-
apt-get install -y dotnet-sdk-6.0
12+
RUN curl --location https://dot.net/v1/dotnet-install.sh \
13+
--output dotnet-install.sh \
14+
&& chmod +x dotnet-install.sh \
15+
&& ./dotnet-install.sh --channel 6.0
16+
&& rm dotnet-install.sh
17+
ENV DOTNET_ROOT=$HOME/.dotnet
18+
ENV PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools
1919

2020
ENV NI_HOME=/opt/nuget-inspector/bin
2121
ENV PATH=$PATH:$NI_HOME

0 commit comments

Comments
 (0)