oysteikt/wiki-math-bot
oysteikt
/
wiki-math-bot
Archived
1
0
Fork 0

Add docker file

This commit is contained in:
Oystein Kristoffer Tveit 2021-03-26 23:41:22 +01:00
parent 2c2304082a
commit addc0901f1
2 changed files with 18 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
bin
obj
Dockerfile

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
# build application
WORKDIR /src/Bot
COPY . .
RUN dotnet restore
RUN dotnet publish -c release -o /app --no-self-contained --no-restore
# final stage/image
FROM mcr.microsoft.com/dotnet/runtime:5.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["./Bot"]