SonarCloud with Docker

I am new to SonarCloud . Could anyone please help to understand how Sonar quality gate task can be implemented in docker file building a dot net code in azure ? If it’s classic or YAML pipeline I know there is task in the pipeline but I am not sure how that can be integrated in a docker file. Other sonar related tasks are integrated to docker file and i could see the result in sonar cloud portal but i need that result in pipeline as well as (as an extension).

You can add sonar.qualitygate.wait=true to the analysis to wait for the Quality Gate and fail the build if it fails, but if you’re looking to populate the build property (and make it look exactly like the task does), you’ll need to dig into the code of the task and recreate it in a script.

Thanks for the information. I will check this and get back to the community in case if I face any issue in this.