forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (18 loc) · 667 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM --platform=$BUILDPLATFORM golang:alpine AS build
ARG TARGETOS
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
LABEL stage=build-env
WORKDIR /app
# Copy and build
COPY ./src /app
COPY Directory.Build.props /
RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0-nanoserver-1809 AS build_windows
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS build_linux
FROM build_${TARGETOS} AS aspnet
EXPOSE 80
ENV ASPNETCORE_URLS http://+:80
WORKDIR /app
COPY --from=build-env /app/build/release .
ENTRYPOINT ["dotnet", "OrchardCore.Cms.Web.dll"]