Files
Khwezi Mngoma 216f4978d7
continuous-integration/drone/pr Build is passing
Refactored dockerfile
2026-05-16 01:33:17 +02:00

20 lines
521 B
Docker

# Stage 1: Build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /app
COPY ["nuget.config", "./"]
COPY ["ShopAdmin/ShopAdmin.csproj", "ShopAdmin/"]
RUN dotnet restore "ShopAdmin/ShopAdmin.csproj" --configfile nuget.config
COPY . .
RUN dotnet publish "ShopAdmin/ShopAdmin.csproj" -c Release -o /app/publish /p:UseAppHost=false
# Stage 2: Final Image
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "ShopAdmin.dll"]