-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
33 lines (26 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# SPDX-FileCopyrightText: 2024 Emulsion contributors <https://github.com/codingteam/emulsion>
#
# SPDX-License-Identifier: MIT
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
# Install Node.js 18
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY ./Directory.Build.props ./
COPY ./Emulsion/Emulsion.fsproj ./Emulsion/
COPY ./Emulsion.ContentProxy/Emulsion.ContentProxy.fsproj ./Emulsion.ContentProxy/
COPY ./Emulsion.Database/Emulsion.Database.fsproj ./Emulsion.Database/
COPY ./Emulsion.Messaging/Emulsion.Messaging.fsproj ./Emulsion.Messaging/
COPY ./Emulsion.MessageArchive.Frontend/Emulsion.MessageArchive.Frontend.proj ./Emulsion.MessageArchive.Frontend/
COPY ./Emulsion.Settings/Emulsion.Settings.fsproj ./Emulsion.Settings/
COPY ./Emulsion.Telegram/Emulsion.Telegram.fsproj ./Emulsion.Telegram/
COPY ./Emulsion.Web/Emulsion.Web.fsproj ./Emulsion.Web/
RUN dotnet restore Emulsion
COPY . ./
RUN dotnet build Emulsion.MessageArchive.Frontend # required to publish the frontend resources
RUN dotnet publish Emulsion -c Release -o /app/out
FROM mcr.microsoft.com/dotnet/aspnet:9.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Emulsion.dll"]