discord-bot-game/Dockerfile

24 lines
534 B
Docker

FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY . .
RUN dotnet tool restore
RUN dotnet restore "PlayerInteractions/PlayerInteractions.fsproj"
WORKDIR "/src/PlayerInteractions"
RUN dotnet build "PlayerInteractions.fsproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "PlayerInteractions.fsproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT "./PlayerInteractions"