Files
Argus/Dockerfile
T
Курнат Андрей 5f80c4bf6a Initial Argus web catalog
2026-06-20 19:55:11 +03:00

27 lines
684 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY ["Argus.csproj", "./"]
RUN dotnet restore "Argus.csproj"
COPY . .
RUN dotnet publish "Argus.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS=http://+:5105
COPY --from=build /app/publish .
EXPOSE 5105
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD curl --fail http://127.0.0.1:5105/health || exit 1
ENTRYPOINT ["dotnet", "Argus.dll"]