dotnet restore
command in Dockerfile fails with the following message
The remote certificate is invalid because of errors in the certificate chain: PartialChain
/usr/share/dotnet/sdk/8.0.100-rc.1.23463.5/NuGet.targets(156,5): error : The SSL connection could not be established, see inner exception. [api.csproj]
/usr/share/dotnet/sdk/8.0.100-rc.1.23463.5/NuGet.targets(156,5): error : The remote certificate is invalid because of errors in the certificate chain: PartialChain
This is happening in Release mode but I dont see it Debug mode
Build image:
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
Realized that this is happening on corporate laptop with security tools installed (Zscaler).
Saw no issues while executing it from home PC.