Reduce auth image restore disk usage
This commit is contained in:
@@ -2,12 +2,12 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
# Copy project file first to take advantage of Docker layer caching
|
# Copy project file first to take advantage of Docker layer caching
|
||||||
COPY ["AuthApi.csproj", "./"]
|
COPY ["AuthApi.csproj", "./"]
|
||||||
RUN dotnet restore "AuthApi.csproj"
|
RUN dotnet restore "AuthApi.csproj" --disable-parallel
|
||||||
|
|
||||||
# Copy the remaining source and publish
|
# Copy the remaining source and publish
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN dotnet publish "AuthApi.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "AuthApi.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
Reference in New Issue
Block a user