-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (28 loc) · 1.71 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
34
35
# !!!
# THIS DOCKERFILE IS NOT MEANT TO BE DEPLOYED!
#
# This dockerfile is meant to build plugins for the main Hive backend (github.com/Atlas-Rhythm/Hive)
#!!!
# Restore and build the project
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
# Define build arguments to sign into GitHub Packages' NuGet repository
ARG NUGET_USER_NAME
ARG NUGET_AUTH_TOKEN
COPY . .
# Add GitHub Packages as a NuGet Source (this requires authentication!!)
RUN dotnet nuget add source --username $NUGET_USER_NAME --password $NUGET_AUTH_TOKEN --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Atlas-Rhythm/index.json"
# Restore and build
RUN dotnet restore
RUN dotnet build -c Release
# Copy project artifacts to a staging directory.
# The Hive dockerfile will copy these plugins to its own image.
# REVIEW: my docker experience is pretty minimal so im not sure if this is the best solution.
FROM build AS final
COPY --from=build "artifacts/bin/Hive.AdditionalUserDataExposer/Release/net6.0/" "Plugins/Hive.AdditionalUserDataExposer/"
COPY --from=build "artifacts/bin/Hive.FileSystemCdnProvider/Release/net6.0/" "Plugins/Hive.FileSystemCdnProvider/"
COPY --from=build "artifacts/bin/Hive.FileSystemRuleProvider/Release/net6.0/" "Plugins/Hive.FileSystemRuleProvider/"
COPY --from=build "artifacts/bin/Hive.PermissionQuery/Release/net6.0/" "Plugins/Hive.PermissionQuery/"
COPY --from=build "artifacts/bin/Hive.RateLimiting/Release/net6.0/" "Plugins/Hive.RateLimiting/"
COPY --from=build "artifacts/bin/Hive.Tags/Release/net6.0/" "Plugins/Hive.Tags/"
COPY --from=build "artifacts/bin/Hive.Tags.Categories/Release/net6.0/" "Plugins/Hive.Tags.Categories/"
COPY --from=build "artifacts/bin/Hive.Webhooks/Release/net6.0/" "Plugins/Hive.Webhooks/"