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:59:58 +07:00
parent 593457a9e3
commit cf89bbeafc

View File

@@ -20,11 +20,11 @@ COPY src/ ./src/
# EN: Build the application
# VI: Build ứng dụng
WORKDIR "/src/src/BookingService.API"
RUN dotnet build "BookingService.API.csproj" -c Release -o /app/build --no-restore
RUN dotnet build "BookingService.API.csproj" -c Release -o /app/build
# Publish stage / Giai đoạn publish
FROM build AS publish
RUN dotnet publish "BookingService.API.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
RUN dotnet publish "BookingService.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