Azure-in-bullet-points

Containers

Docker

Multi-stage builds

    FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env # from docker hub, good to name with AS for flexible re-ordering
    WORKDIR /app # create directory

    # Copy csproj and restore as distinct layers
    COPY *.csproj ./
    RUN dotnet restore

    # Copy everything else and build
    COPY . ./
    RUN dotnet publish -c Release -o out

    # Build runtime image
    FROM mcr.mcrosoft.com/dotnet/core/aspnet:2.2 # for running application
    WORKDIR /app
    COPY --from=build-env /app/out .
    ENTRYPOINT ["dotnet", "serverappname.dll"]

Docker compose

Kubernetes

Azure Service Fabric