Files
CMS/Dockerfile
T
masoodafar-web 839250e132
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 10s
fix: Update Dockerfile to use internal registry for .NET SDK and ASP.NET images
2026-01-29 02:25:38 +03:30

17 lines
518 B
Docker

FROM 194.5.195.53:32082/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copy solution and project files
COPY src/ ./
# Restore and publish
RUN dotnet restore "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj"
RUN dotnet publish "CMSMicroservice.WebApi/CMSMicroservice.WebApi.csproj" -c Release -o /app/publish --no-restore
FROM 194.5.195.53: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"]