When starting using the example listed here, the vs_buildtools.exe process returns immediately. People, apparently from microsoft, indicated on stack overflow that a start /wait is needed before the command. They also indicated that it was shown in the documentation, but I don't see it listed on the linked page.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
In Step 4 here, this line includes the wait command:
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache
I don't believe that does the same thing, unless executed with start /wait the --wait flag won't actually do what you think it will.
To add to the above, running the command from the documentation returns immediately for me (which does not seem to work with docker builds, as none of the files which the process is supposed to create have been created by the time it moves on to the next step)
However adding the start /wait command as indicated above seems to solve the problem
Reopening to investigate further.
I just confirmed with the engineering team that adding the start /wait command is the right way to solve the problem. I will update the documentation accordingly - should be live this afternoon. Thanks for your comments and contributions.