discord-bot/Dockerfile

31 lines
1.0 KiB
Docker
Raw Normal View History

FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS base
# Native libgdiplus dependencies
RUN apt-get update
2022-08-16 22:31:40 +00:00
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev fonts-roboto tzdata
2021-01-27 17:11:49 +00:00
# debian-specific?
#RUN rm -rf /var/lib/apt/lists/*
#RUN ln -s /lib/x86_64-linux-gnu/libdl-2.24.so /lib/x86_64-linux-gnu/libdl.so
# Regular stuff
#COPY packages /root/.nuget/packages/
WORKDIR /src
COPY . .
#RUN rm -rf ./packages
2022-03-05 15:10:32 +00:00
RUN git status
# Asks for user/pw otherwise..
2022-05-01 16:28:12 +00:00
RUN git remote set-url origin https://github.com/RPCS3/discord-bot.git
RUN git config --remove-section http."https://github.com/"
# Build and test everything
RUN dotnet restore "CompatBot/CompatBot.csproj"
RUN dotnet build "CompatBot/CompatBot.csproj" -c Release
ENV RUNNING_IN_DOCKER true
2020-07-30 12:06:50 +00:00
# Limit server GC to 512 MB heap max
ENV COMPlus_gcServer 1
2020-11-10 17:05:52 +00:00
# ENV COMPlus_GCHeapHardLimit 0x20000000
WORKDIR /src/CompatBot
RUN dotnet run -c Release --dry-run
ENTRYPOINT ["dotnet", "run", "-c", "Release", "CompatBot.csproj"]
2022-04-01 14:18:27 +00:00
#ENTRYPOINT ["/bin/bash"]