2026-06-03 07:52:42 +03:30
|
|
|
# Hamkadr (همکادر) — .NET 10 Razor Pages. Images + NuGet pulled through Nexus (mirror.soroushasadi.com).
|
|
|
|
|
FROM mirror.soroushasadi.com/dotnet/sdk:10.0 AS build
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
COPY nuget.docker.config /tmp/nuget.config
|
|
|
|
|
COPY src/ ./src/
|
2026-06-04 14:36:00 +03:30
|
|
|
RUN dotnet restore src/JobsMedical.Web/JobsMedical.Web.csproj --configfile /tmp/nuget.config -p:NuGetAudit=false
|
2026-06-03 07:52:42 +03:30
|
|
|
RUN dotnet publish src/JobsMedical.Web/JobsMedical.Web.csproj -c Release -o /out --no-restore \
|
2026-06-04 14:36:00 +03:30
|
|
|
/p:UseAppHost=false /p:NuGetAudit=false
|
2026-06-03 07:52:42 +03:30
|
|
|
|
|
|
|
|
FROM mirror.soroushasadi.com/dotnet/aspnet:10.0
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY --from=build /out ./
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
ENV ASPNETCORE_URLS=http://+:8080 \
|
2026-06-03 23:38:22 +03:30
|
|
|
ASPNETCORE_ENVIRONMENT=Production \
|
2026-06-03 07:52:42 +03:30
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT=1
|
2026-06-03 23:38:22 +03:30
|
|
|
|
|
|
|
|
# Liveness probe (TCP connect to Kestrel) — lets the deploy job wait on
|
|
|
|
|
# `docker inspect Health.Status`. bash ships in the Debian-based aspnet image.
|
|
|
|
|
HEALTHCHECK --interval=15s --timeout=10s --start-period=30s --retries=3 \
|
|
|
|
|
CMD bash -c 'echo > /dev/tcp/localhost/8080' || exit 1
|
|
|
|
|
|
2026-06-03 07:52:42 +03:30
|
|
|
ENTRYPOINT ["dotnet", "JobsMedical.Web.dll"]
|