I am trying to containerization of a web application in docker, which connect net.tcp WCF call from the application, which was working perfectly. Bu when I try to run the application through Docker,I am getting an error – GSSAPI operation failed with error – No credentials were supplied, or the credentials were unavailable or inaccessible (SPNEGO cannot find mechanisms to negotiate) at the point where i am calling net.tcp WCF call.
No authentication required for net.tcp WCF call (net.tcp://reports.test2.projecttest.com:8200/)
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.16 AS base
# Fix Global Invariant Issue
RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
# add rackspace CA certificates
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
COPY CACerts/*.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 8200
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16 AS build
WORKDIR /src
COPY ["NuGet.config", "NuGet.Config"]
COPY ["TestProject.TestApp.Service/TestProject.TestApp.Service.csproj", "TestProject.TestApp.Service/"]
RUN dotnet restore "TestProject.TestApp.Service/TestProject.TestApp.Service.csproj"
COPY . .
WORKDIR "/src/TestProject.TestApp.Service"
RUN dotnet build "TestProject.TestApp.Service.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "TestProject.TestApp.Service.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
COPY TestProject.TestApp.Service/appsettings.json .
ENTRYPOINT ["dotnet", "TestProject.TestApp.Service.dll"]