-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (43 loc) · 2.35 KB
/
Dockerfile
File metadata and controls
56 lines (43 loc) · 2.35 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 3579
FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /src
COPY ["NerdBotCore/NerdBotCommon/NerdBotCommon.csproj", "NerdBotCore/NerdBotCommon/"]
COPY ["NerdBotCore/NerdBotHost/NerdBotHost.csproj", "NerdBotCore/NerdBotHost/"]
# Plugins
COPY ["NerdBotCore/NerdBotCorePlugin/NerdBotCorePlugin.csproj", "NerdBotCore/NerdBotCorePlugin/"]
COPY ["NerdBotCore/NerdBotScryFallPlugin/NerdBotScryFallPlugin.csproj", "NerdBotCore/NerdBotScryFallPlugin/"]
COPY ["NerdBotCore/NerdBotRoastMePlugin/NerdBotRoastMePlugin.csproj", "NerdBotCore/NerdBotRoastMePlugin/"]
COPY ["NerdBotCore/NerdBotGiphyPlugin/NerdBotGiphyPlugin.csproj", "NerdBotCore/NerdBotGiphyPlugin/"]
COPY ["NerdBotCore/NerdBotUrbanDictPlugin/NerdBotUrbanDictPlugin.csproj", "NerdBotCore/NerdBotUrbanDictPlugin/"]
RUN dotnet restore "NerdBotCore/NerdBotCommon/NerdBotCommon.csproj"
RUN dotnet restore "NerdBotCore/NerdBotHost/NerdBotHost.csproj"
# Plugins
RUN dotnet restore "NerdBotCore/NerdBotCorePlugin/NerdBotCorePlugin.csproj"
RUN dotnet restore "NerdBotCore/NerdBotScryFallPlugin/NerdBotScryFallPlugin.csproj"
RUN dotnet restore "NerdBotCore/NerdBotRoastMePlugin/NerdBotRoastMePlugin.csproj"
RUN dotnet restore "NerdBotCore/NerdBotGiphyPlugin/NerdBotGiphyPlugin.csproj"
RUN dotnet restore "NerdBotCore/NerdBotUrbanDictPlugin/NerdBotUrbanDictPlugin.csproj"
COPY . .
WORKDIR "/src/NerdBotCore/NerdBotCommon"
RUN dotnet build "NerdBotCommon.csproj" -c Release -o /app
# Build plugins
WORKDIR "/src/NerdBotCore/NerdBotCorePlugin"
RUN dotnet build "NerdBotCorePlugin.csproj" -c Release -o /app/plugins
WORKDIR "/src/NerdBotCore/NerdBotScryFallPlugin"
RUN dotnet build "NerdBotScryFallPlugin.csproj" -c Release -o /app/plugins
WORKDIR "/src/NerdBotCore/NerdBotRoastMePlugin"
RUN dotnet build "NerdBotRoastMePlugin.csproj" -c Release -o /app/plugins
WORKDIR "/src/NerdBotCore/NerdBotGiphyPlugin"
RUN dotnet build "NerdBotGiphyPlugin.csproj" -c Release -o /app/plugins
WORKDIR "/src/NerdBotCore/NerdBotUrbanDictPlugin"
RUN dotnet build "NerdBotUrbanDictPlugin.csproj" -c Release -o /app/plugins
WORKDIR "/src/NerdBotCore/NerdBotHost"
RUN dotnet build "NerdBotHost.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "NerdBotHost.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "NerdBotHost.dll"]