Files
admin 4121c59484
k8s smoke test / test (push) Failing after 20s
Deploy Promiscuity Auth API / deploy (push) Successful in 1m57s
Reduce auth image restore disk usage
2026-07-20 01:17:48 -05:00

22 lines
600 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
# Copy project file first to take advantage of Docker layer caching
COPY ["AuthApi.csproj", "./"]
RUN dotnet restore "AuthApi.csproj" --disable-parallel
# Copy the remaining source and publish
COPY . .
RUN dotnet publish "AuthApi.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_URLS=http://+:8080 \
ASPNETCORE_ENVIRONMENT=Production
EXPOSE 8080
ENTRYPOINT ["dotnet", "AuthApi.dll"]