2019-12-23 14:50:02 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
2019-08-12 04:49:18 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
2020-08-25 18:37:31 +00:00
|
|
|
# Restore/fetch dependencies excluding app code to make use of caching
|
|
|
|
COPY PluralKit.sln nuget.config /app/
|
|
|
|
COPY PluralKit.API/PluralKit.API.csproj /app/PluralKit.API/
|
|
|
|
COPY PluralKit.Bot/PluralKit.Bot.csproj /app/PluralKit.Bot/
|
|
|
|
COPY PluralKit.Core/PluralKit.Core.csproj /app/PluralKit.Core/
|
|
|
|
COPY PluralKit.Tests/PluralKit.Tests.csproj /app/PluralKit.Tests/
|
|
|
|
RUN dotnet restore PluralKit.sln
|
|
|
|
|
|
|
|
# Copy the rest of the code and build
|
|
|
|
COPY . /app
|
|
|
|
RUN dotnet build -c Release -o bin
|
2019-08-12 04:49:18 +00:00
|
|
|
|
2020-08-25 18:37:31 +00:00
|
|
|
# Run :)
|
|
|
|
# Allow overriding CMD from eg. docker-compose to run API layer too
|
|
|
|
ENTRYPOINT ["dotnet"]
|
|
|
|
CMD ["bin/PluralKit.Bot.dll"]
|