Created
July 16, 2024 18:05
-
-
Save ahokinson/20aa9de311ef6a4efb2fea5af76915ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:24.04 | |
# Install Prerequisites | |
RUN apt update \ | |
&& apt upgrade -y \ | |
&& apt install -y curl | |
# Install DotNet SDK | |
RUN curl https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \ | |
&& dpkg -i packages-microsoft-prod.deb \ | |
&& rm packages-microsoft-prod.deb \ | |
&& apt update \ | |
&& apt install -y dotnet-sdk-8.0 | |
# Install SonarScanner for DotNet | |
RUN export PATH="$PATH:/root/.dotnet/tools" | |
RUN dotnet tool install --global dotnet-sonarscanner | |
# Clean Image | |
RUN apt remove -y curl \ | |
&& apt clean \ | |
&& apt autoremove -y \ | |
&& rm -rf /var/lib/apt/lists/* \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment