Sonarcloud Scan in Dockerfile

We are having trouble running the Sonarcloud scan in Docker file. This is running as part of our Azure DevOps Pipeline. See error message below.

Step 23/38 : RUN dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"

---> Running in 0c09f1289588

SonarScanner for MSBuild 5.8

Using the .NET Core version of the Scanner for MSBuild

Default properties file was found at /root/.dotnet/tools/.store/dotnet-sonarscanner/5.8.0/dotnet-sonarscanner/5.8.0/tools/net5.0/any/SonarQube.Analysis.xml

Loading analysis properties from /root/.dotnet/tools/.store/dotnet-sonarscanner/5.8.0/dotnet-sonarscanner/5.8.0/tools/net5.0/any/SonarQube.Analysis.xml

The format of the analysis property sonar.login= is invalid

The command '/bin/sh -c dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"' returned a non-zero code: 1


Are you sure "$SONAR_TOKEN" interpolates correctly?