Adding docker and workflows

This commit is contained in:
2023-01-30 23:22:37 -03:00
parent 8216e6c85a
commit 10ee66d107
3 changed files with 84 additions and 0 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /App
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build a release
RUN dotnet build -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
RUN apt update && apt install -y libopus-dev opus-tools
WORKDIR /App
COPY --from=build-env /App/out .
ENTRYPOINT ["dotnet", "Kasbot.dll"]