dotnetcore & docker
https://hub.docker.com/_/microsoft-dotnet?tab=description
https://hub.docker.com/_/microsoft-dotnet-sdk/
https://hub.docker.com/_/microsoft-dotnet-aspnet/
https://hub.docker.com/_/microsoft-dotnet-runtime/
docker pull mcr.microsoft.com/dotnet/sdk
docker pull mcr.microsoft.com/dotnet/runtime
docker pull mcr.microsoft.com/dotnet/aspnet
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-6.0#aspnet-core-docker-images
# https://hub.docker.com/_/microsoft-dotnet FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /source # copy csproj and restore as distinct layers COPY *.sln . COPY aspnetapp/*.csproj ./aspnetapp/ RUN dotnet restore # copy everything else and build app COPY aspnetapp/. ./aspnetapp/ WORKDIR /source/aspnetapp RUN dotnet publish -c release -o /app --no-restore # final stage/image FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app COPY --from=build /app ./ ENTRYPOINT ["dotnet", "aspnetapp.dll"]
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base EXPOSE 80 COPY . . ENTRYPOINT ["dotnet", "xxx.dll"]