mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 19:22:45 +00:00
fix docker build
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
|
||||
# # restore all project dependencies
|
||||
RUN dotnet restore -v d Notesnook.sln
|
||||
WORKDIR /app
|
||||
|
||||
ADD . /app
|
||||
|
||||
# restore all project dependencies
|
||||
RUN dotnet restore -v d ./Notesnook.sln
|
||||
|
||||
# build
|
||||
ENV DOTNET_TC_QuickJitForLoops="1" DOTNET_ReadyToRun="0" DOTNET_TieredPGO="1" DOTNET_SYSTEM_GLOBALIZATION_INVARIANT="true"
|
||||
RUN dotnet publish /Notesnook.API/Notesnook.API.csproj -c Release -o /out --use-current-runtime --self-contained false --no-restore
|
||||
|
||||
RUN dotnet publish ./Notesnook.API/Notesnook.API.csproj -c Release -o /app/out --use-current-runtime --self-contained false --no-restore
|
||||
|
||||
# final stage/image
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /out .
|
||||
COPY --from=build /app/out .
|
||||
ENTRYPOINT ["dotnet", "Notesnook.API.dll"]
|
||||
@@ -1,14 +1,19 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
|
||||
# # restore all project dependencies
|
||||
RUN dotnet restore -v d Notesnook.sln
|
||||
WORKDIR /app
|
||||
|
||||
ADD . /app
|
||||
|
||||
# restore all project dependencies
|
||||
RUN dotnet restore -v d ./Notesnook.sln
|
||||
|
||||
# build
|
||||
ENV DOTNET_TC_QuickJitForLoops="1" DOTNET_ReadyToRun="0" DOTNET_TieredPGO="1" DOTNET_SYSTEM_GLOBALIZATION_INVARIANT="true"
|
||||
RUN dotnet publish /Streetwriters.Identity/Streetwriters.Identity.csproj -c Release -o /out --use-current-runtime --self-contained false --no-restore
|
||||
|
||||
RUN dotnet publish ./Streetwriters.Identity/Streetwriters.Identity.csproj -c Release -o /app/out --use-current-runtime --self-contained false --no-restore
|
||||
|
||||
# final stage/image
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /out .
|
||||
COPY --from=build /app/out .
|
||||
ENTRYPOINT ["dotnet", "Streetwriters.Identity.dll"]
|
||||
@@ -1,14 +1,19 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
|
||||
# # restore all project dependencies
|
||||
RUN dotnet restore -v d Notesnook.sln
|
||||
WORKDIR /app
|
||||
|
||||
ADD . /app
|
||||
|
||||
# restore all project dependencies
|
||||
RUN dotnet restore -v d ./Notesnook.sln
|
||||
|
||||
# build
|
||||
ENV DOTNET_TC_QuickJitForLoops="1" DOTNET_ReadyToRun="0" DOTNET_TieredPGO="1" DOTNET_SYSTEM_GLOBALIZATION_INVARIANT="true"
|
||||
RUN dotnet publish /Streetwriters.Messenger/Streetwriters.Messenger.csproj -c Release -o /out --use-current-runtime --self-contained false --no-restore
|
||||
|
||||
RUN dotnet publish ./Streetwriters.Identity/Streetwriters.Messenger.csproj -c Release -o /app/out --use-current-runtime --self-contained false --no-restore
|
||||
|
||||
# final stage/image
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /out .
|
||||
COPY --from=build /app/out .
|
||||
ENTRYPOINT ["dotnet", "Streetwriters.Messenger.dll"]
|
||||
Reference in New Issue
Block a user