- Initial work on Dockerfile

- Updated README.md with more information
- Added some todos
This commit is contained in:
Kwoth
2021-07-18 09:16:42 +02:00
parent 971b5078b7
commit b84f40def6
7 changed files with 51 additions and 12 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /source
COPY src/NadekoBot/*.csproj src/NadekoBot/
COPY src/NadekoBot.Coordinator/*.csproj src/NadekoBot.Coordinator/
COPY src/ayu/Ayu.Discord.Voice/*.csproj src/ayu/Ayu.Discord.Voice/
RUN dotnet restore src/NadekoBot/
COPY . .
WORKDIR /source/src/NadekoBot
RUN dotnet publish -c Release -o /app --no-restore
# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:5.0
ENV shard_id=0
ENV total_shards=1
WORKDIR /app
COPY --from=build /app ./
VOLUME [ "/data" ]
ENTRYPOINT dotnet NadekoBot.dll "$shard_id" "$total_shards"