Docker image build lasts forever and CPU usage is 0%.
Build command:
docker build --no-cache --progress=plain -t harness/err_tracking_build_ex:latest .
The Dockerfile content:
# escape=`
# Select the required Windows Server Release:
FROM mcr.microsoft.com/windows/servercore:20H2
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
RUN `
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
`
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
&& (start /w vs.exe --norestart --wait --quiet --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
--add Microsoft.VisualStudio.Product.BuildTools `
--add Microsoft.VisualStudio.Workload.MSBuildTools `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Component.VC.Redist.MSM `
--add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
`
# Cleanup
&& del /q vs_buildtools.exe
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
Log:
Sending build context to Docker daemon 4.608kB
Step 1/4 : FROM mcr.microsoft.com/windows/servercore:20H2
---> 2252ecd481b9
Step 2/4 : SHELL ["cmd", "/S", "/C"]
---> Using cache
---> 48199772975d
Step 3/4 : RUN curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe && (start /w vs.exe --norestart --wait --quiet --nocache --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" --add Microsoft.VisualStudio.Product.BuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Redist.MSM --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools || IF "%ERRORLEVEL%"=="3010" EXIT 0) && del /q vs_buildtools.exe
---> Running in a7068b95b75e
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1611k 100 1611k 0 0 1611k 0 0:00:01 0:00:01 --:--:-- 8668k
(Stuck in the last row forever)
I also tried without --no-cache but it didn't help.
Any suggestion?