2024-01-05 22:32:38 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
|
2023-07-09 01:26:11 +00:00
|
|
|
WORKDIR /mwl
|
|
|
|
COPY ./MyWebLog.sln ./
|
|
|
|
COPY ./Directory.Build.props ./
|
|
|
|
COPY ./MyWebLog/MyWebLog.fsproj ./MyWebLog/
|
|
|
|
COPY ./MyWebLog.Data/MyWebLog.Data.fsproj ./MyWebLog.Data/
|
|
|
|
COPY ./MyWebLog.Domain/MyWebLog.Domain.fsproj ./MyWebLog.Domain/
|
|
|
|
RUN dotnet restore
|
|
|
|
|
|
|
|
COPY . ./
|
|
|
|
WORKDIR /mwl/MyWebLog
|
2024-01-05 22:32:38 +00:00
|
|
|
RUN dotnet publish -f net8.0 -c Release -r linux-x64 --no-self-contained -p:PublishSingleFile=false
|
2023-07-09 01:26:11 +00:00
|
|
|
|
|
|
|
FROM alpine AS theme
|
|
|
|
RUN apk add --no-cache zip
|
|
|
|
WORKDIR /themes
|
|
|
|
COPY ./default-theme ./default-theme/
|
|
|
|
RUN zip default-theme.zip ./default-theme/*
|
|
|
|
COPY ./admin-theme ./admin-theme/
|
|
|
|
RUN zip admin-theme.zip ./admin-theme/*
|
|
|
|
|
2024-01-05 22:32:38 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine as final
|
2023-07-09 01:26:11 +00:00
|
|
|
WORKDIR /app
|
2023-07-19 01:53:04 +00:00
|
|
|
RUN apk add --no-cache icu-libs
|
|
|
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
2024-01-05 22:32:38 +00:00
|
|
|
COPY --from=build /mwl/MyWebLog/bin/Release/net8.0/linux-x64/publish/ ./
|
2023-07-09 01:26:11 +00:00
|
|
|
COPY --from=theme /themes/*.zip /app/
|
2024-01-05 22:32:38 +00:00
|
|
|
RUN mkdir themes
|
2023-07-09 01:26:11 +00:00
|
|
|
|
|
|
|
EXPOSE 80
|
2023-07-19 01:53:04 +00:00
|
|
|
CMD [ "dotnet", "/app/MyWebLog.dll" ]
|