Added config for Docker

This commit is contained in:
Álvaro Gómez Cuenca 2020-12-09 16:01:38 +01:00
commit 018db043e7
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,18 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build-env /app/out .
#COPY config.json ./
ENTRYPOINT ["dotnet", "Bot_Discord_CSharp.dll"]