Files
CMS/Dockerfile
masoodafar-web 9b82b45e46
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 50s
chore(staging): point registry and K8S to 185.252.31.44 after server migration
2026-09-22 22:18:43 +03:30

20 lines
617 B
Docker

FROM 185.252.31.44:32082/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copy NuGet config first
COPY src/NuGet.config ./
# Copy solution and project files
COPY src/ ./
# Restore with Nexus config and publish
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" --configfile NuGet.config
RUN dotnet publish "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" -c Release -o /app/publish --no-restore
FROM 185.252.31.44:32082/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
ENTRYPOINT ["dotnet", "CMSMicroservice.WebApi.dll"]