title: It was not possible to find any installed .NET Core SDKs on Windows Docker Desktop
body: <p>Why do I get this message when I run the docker image in the Windows Docker Desktop?</p>
  <pre><code>It was not possible to find any installed .NET Core SDKs
  Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
  https://aka.ms/dotnet-download
  </code></pre>
  <p>I start to build the image with: docker build -t idp -f Dockerfile.IDP .</p>
  <p>Next I start the image with this command: docker run --name idp -it -dt -p 8443:443 idp</p>
  <p>This is how my Dockerfile look like:</p>
  <pre><code>    FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
  
      # copy this first so the restore layer gets cached when the csproj files are unchanged
      COPY ./*.sln ./
      COPY ./src/ProjectA/ProjectA.csproj ./src/ProjectA/
      WORKDIR /src
      RUN dotnet restore ./ProjectA/ProjectA.csproj
      COPY . /
      RUN dotnet build ./ProjectA/ProjectA.csproj -c release --no-restore
  
      FROM build AS publish
      RUN dotnet publish ./ProjectA/ProjectA.csproj -c release --no-build -o /app/publish
      COPY ./*.pfx /app/publish
  
      FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime
      WORKDIR /app
      COPY --from=publish /app/publish ./
  
      RUN apk add --no-cache icu-libs
      ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
      ENV ASPNETCORE_URLS=&quot;https://+:443&quot;
      ENV TZ=Europe/Amsterdam
  
      VOLUME /app
  
      ENTRYPOINT [&quot;dotnet&quot;, &quot;ProjectA.dll&quot;]
      EXPOSE 443
  </code></pre>
  <p>What am I missing here?</p>
  <p>Sometimes it works and sometimes it doesn't.</p>
  <p>The mean idear is to run the .NET Core 3.1 application on a linux container with HTTPS.</p>
  <p>I already looked for an accepted answer that could help me, but I didn't find any so far.</p>
  <p>I got it to work with the folling somehow:</p>
  <p>docker pull mcr.microsoft.com/dotnet/aspnet:3.1</p>
  <p>docker pull mcr.microsoft.com/dotnet/aspnet:latest</p>
  <p>docker pull mcr.microsoft.com/dotnet/sdk:3.1</p>
  <p>docker pull mcr.microsoft.com/dotnet/sdk:latest</p>
  <p>and the build and run with the commands given above.</p>
  <p>It magically worked. But I'm not amused that it sometimes works and sometimes not. After I start it, I removed the mcr.* pulls and restart the app again and it still works.
  Any idears why and how to solve it to a perminant solution?</p>