15 lines
345 B
Text
15 lines
345 B
Text
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||
|
|
WORKDIR /App
|
||
|
|
|
||
|
|
# Copy everything
|
||
|
|
COPY . ./
|
||
|
|
# Restore as distinct layers
|
||
|
|
RUN dotnet restore
|
||
|
|
# Build and publish a release
|
||
|
|
RUN dotnet publish -o out
|
||
|
|
|
||
|
|
# Build runtime image
|
||
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
||
|
|
WORKDIR /App
|
||
|
|
COPY --from=build /App/out .
|
||
|
|
ENTRYPOINT ["dotnet", "test-initial-repo.dll"]
|