Add docker file
This commit is contained in:
parent
2c2304082a
commit
addc0901f1
|
@ -0,0 +1,3 @@
|
||||||
|
bin
|
||||||
|
obj
|
||||||
|
Dockerfile
|
|
@ -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"]
|
Reference in New Issue