24 lines
479 B
Docker
24 lines
479 B
Docker
# Build
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
|
|
|
WORKDIR /source
|
|
|
|
COPY --link . .
|
|
|
|
RUN dotnet restore /source/Oqtane.sln
|
|
|
|
RUN dotnet build "/source/Oqtane.sln" -c Release -o /source/build/
|
|
|
|
# Publish
|
|
FROM build AS publish
|
|
|
|
RUN dotnet publish "Oqtane.Server/Oqtane.Server.csproj" -c Release -o /source/publish/
|
|
|
|
# Deploy
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS deploy
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
COPY --from=publish /source/publish/ /app/
|
|
ENTRYPOINT ["dotnet", "Oqtane.Server.dll"] |