Update Dockerfile
This commit is contained in:
@@ -1,13 +1,10 @@
|
|||||||
# Use the official Microsoft .NET Core SDK image as the build environment
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy everything and build the project
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
RUN dotnet publish -c Release -o out
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
# Generate the runtime image
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build-env /app/out .
|
COPY --from=build-env /app/out .
|
||||||
|
|||||||
Reference in New Issue
Block a user