Typically I use following images for .net core 3.1 and it works fine.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
I have for experimental reason started a new .net 5 project and created dockerfile
with following
FROM mcr.microsoft.com/dotnet/core/aspnet:5.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/sdk:5.0-buster AS build
and have following issue:
=> ERROR [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:5.0-buster 0.2s
=> ERROR [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:5.0-buster-slim 0.2s
=> CANCELED [build 1/7] FROM mcr.microsoft.com/dotnet/core/sdk:5.0-buster 0.0s
=> => resolve mcr.microsoft.com/dotnet/core/sdk:5.0-buster 0.0s
=> [internal] load build context 0.0s
=> ERROR [base 1/2] FROM mcr.microsoft.com/dotnet/core/aspnet:5.0-buster-slim 0.0s
=> => resolve mcr.microsoft.com/dotnet/core/aspnet:5.0-buster-slim