diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..40b2902a2214dbdefe13d3e54cb1d95c3bd44438 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +bin +obj +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..204525fb0442efccfe3dac432bdc49fbd6bcf52c --- /dev/null +++ b/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"] \ No newline at end of file