Template for a good new topic, formatted with Markdown:
- ALM used- Azure DevOps
- CI system used - Azure DevOps
- Scanner command used when applicable (private details masked)
WORKDIR "/src/Web.MerchantPortal.Pro"
## Install Java, because the sonarscanner needs it.
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y openjdk-17-jre
## Install sonarscanner
RUN dotnet tool install --global dotnet-sonarscanner
RUN dotnet tool install --global coverlet.console
ENV PATH="$PATH:/root/.dotnet/tools"
## Start scanner
RUN dotnet sonarscanner begin \
/k:"$SONAR_PRJ_KEY" \
/o:"$SONAR_ORG" \
/d:sonar.host.url="$SONAR_HOST" \
/d:sonar.login="$SONAR_TOKEN" \
/v:"$BUILDID"
# Build the .NET application
RUN dotnet build "Web.MerchantPortal.Pro.csproj" -c Release -o /app/build --no-restore
## Stop scanner
RUN dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
Sonar Execution is taking time while building inside docker
- Languages of the repository - .net