Using DotNet Core comes some responsibilities, one of those is making sure your application is up and running.
Since DotNet Core 2.2 the introductions of health checks have been established.
There are two types of Health Checks
Continue reading Health Checks
- Liveness Health Checks
- Readiness Health Checks
Here is a working example of a simple Docker file for a .NET Core 3.1 project
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
COPY project.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "project.dll"]