build: Remove --no-restore flag from dotnet build and publish commands in Dockerfile.

This commit is contained in:
Ho Ngoc Hai
2026-01-18 02:10:34 +07:00
parent 23c8514ca4
commit 8fa5e05d2c

View File

@@ -20,11 +20,11 @@ COPY src/ ./src/
# EN: Build the application
# VI: Build ứng dụng
WORKDIR "/src/src/AdsBillingService.API"
RUN dotnet build "AdsBillingService.API.csproj" -c Release -o /app/build --no-restore
RUN dotnet build "AdsBillingService.API.csproj" -c Release -o /app/build
# Publish stage / Giai đoạn publish
FROM build AS publish
RUN dotnet publish "AdsBillingService.API.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
RUN dotnet publish "AdsBillingService.API.csproj" -c Release -o /app/publish /p:UseAppHost=false
# Runtime stage / Giai đoạn runtime
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final